Skip to content

Commit 9f0d718

Browse files
[InstCombine] Disable fold from D64285 for non-integer types
llvm-svn: 365959
1 parent 3245248 commit 9f0d718

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,8 @@ static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal,
542542
ICmpInst::Predicate Pred = IC->getPredicate();
543543
Value *CmpLHS = IC->getOperand(0);
544544
Value *CmpRHS = IC->getOperand(1);
545+
if (!CmpRHS->getType()->isIntOrIntVectorTy())
546+
return nullptr;
545547

546548
Value *X, *Y;
547549
unsigned Bitwidth = CmpRHS->getType()->getScalarSizeInBits();

0 commit comments

Comments
 (0)