diff options
author | David Bolvansky <david.bolvansky@gmail.com> | 2019-07-12 21:14:21 +0000 |
---|---|---|
committer | David Bolvansky <david.bolvansky@gmail.com> | 2019-07-12 21:14:21 +0000 |
commit | 9f0d718c662876ee7f97645fdc72ea61ea35549d (patch) | |
tree | 57dac89bd136da8defc407d0a5f78f870f755a2c | |
parent | 32452487ae999eeed03065e3799976944eb936b5 (diff) | |
download | bcm5719-llvm-9f0d718c662876ee7f97645fdc72ea61ea35549d.tar.gz bcm5719-llvm-9f0d718c662876ee7f97645fdc72ea61ea35549d.zip |
[InstCombine] Disable fold from D64285 for non-integer types
llvm-svn: 365959
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp index 1184a1be826..aefaf5af175 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp @@ -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(); |