mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user