diff options
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp')
-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(); |