Skip to content

Commit

Permalink
[InstCombine] Disable fold from D64285 for non-integer types
Browse files Browse the repository at this point in the history
llvm-svn: 365959
  • Loading branch information
davidbolvansky committed Jul 12, 2019
1 parent 3245248 commit 9f0d718
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Expand Up @@ -542,6 +542,8 @@ static Value *foldSelectICmpLshrAshr(const ICmpInst *IC, Value *TrueVal,
ICmpInst::Predicate Pred = IC->getPredicate();
Value *CmpLHS = IC->getOperand(0);
Value *CmpRHS = IC->getOperand(1);
if (!CmpRHS->getType()->isIntOrIntVectorTy())
return nullptr;

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

0 comments on commit 9f0d718

Please sign in to comment.