aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-07-29 18:03:33 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-07-29 18:03:33 +0000
commit1489b0c4e6e1af4e5b7845b997a33cfcc59d36ad (patch)
tree0da38ad6c281bff4f947bdb9de792eb3d8f6bda3 /lib
parent83f13b157344b45431dce6d7ec6a9242ee46a3bd (diff)
downloadexternal_llvm-1489b0c4e6e1af4e5b7845b997a33cfcc59d36ad.zip
external_llvm-1489b0c4e6e1af4e5b7845b997a33cfcc59d36ad.tar.gz
external_llvm-1489b0c4e6e1af4e5b7845b997a33cfcc59d36ad.tar.bz2
PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCompares.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 6c00586..d7e2b72 100644
--- a/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1374,7 +1374,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
case Instruction::Or:
// If bits are being or'd in that are not present in the constant we
// are comparing against, then the comparison could never succeed!
- if (Constant *BOC = dyn_cast<Constant>(BO->getOperand(1))) {
+ if (ConstantInt *BOC = dyn_cast<ConstantInt>(BO->getOperand(1))) {
Constant *NotCI = ConstantExpr::getNot(RHS);
if (!ConstantExpr::getAnd(BOC, NotCI)->isNullValue())
return ReplaceInstUsesWith(ICI,