summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commit0428a61e451c1d7c3b8385c1935955374a928884 (patch)
tree07e01ab4bf46e720e279aa65d84d47be69a51ded /llvm/lib/Transforms
parentb2c657c618f02a8d2102e19f09080f4cd315c54d (diff)
downloadbcm5719-llvm-0428a61e451c1d7c3b8385c1935955374a928884.tar.gz
bcm5719-llvm-0428a61e451c1d7c3b8385c1935955374a928884.zip
PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt. llvm-svn: 109773
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 6c00586412a..d7e2b72b7fa 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud