diff options
author | Justin Bogner <mail@justinbogner.com> | 2013-09-27 20:35:39 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2013-09-27 20:35:39 +0000 |
commit | 5053537a301ee268d3e49f8cf0426f0c536be4e3 (patch) | |
tree | 79c354ab853a4d4b3fc4c5efe23df8df81942396 /lib/Transforms/InstCombine | |
parent | 200a7434f6abc1e469fdf1ee547bc3fe4fbfcc02 (diff) | |
download | external_llvm-5053537a301ee268d3e49f8cf0426f0c536be4e3.zip external_llvm-5053537a301ee268d3e49f8cf0426f0c536be4e3.tar.gz external_llvm-5053537a301ee268d3e49f8cf0426f0c536be4e3.tar.bz2 |
InstCombine: Only foldSelectICmpAndOr for integer types
Currently foldSelectICmpAndOr asserts if the "or" involves a vector
containing several of the same power of two. We can easily avoid this by
only performing the fold on integer types, like foldSelectICmpAnd does.
Fixes <rdar://problem/15012516>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineSelect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineSelect.cpp b/lib/Transforms/InstCombine/InstCombineSelect.cpp index 7581dbe..283bec2 100644 --- a/lib/Transforms/InstCombine/InstCombineSelect.cpp +++ b/lib/Transforms/InstCombine/InstCombineSelect.cpp @@ -367,7 +367,7 @@ static Value *foldSelectICmpAndOr(const SelectInst &SI, Value *TrueVal, Value *FalseVal, InstCombiner::BuilderTy *Builder) { const ICmpInst *IC = dyn_cast<ICmpInst>(SI.getCondition()); - if (!IC || !IC->isEquality()) + if (!IC || !IC->isEquality() || !SI.getType()->isIntegerTy()) return 0; Value *CmpLHS = IC->getOperand(0); |