[llvm-commits] [llvm] r109773 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Jul 29 11:03:33 PDT 2010
Author: efriedma
Date: Thu Jul 29 13:03:33 2010
New Revision: 109773
URL: http://llvm.org/viewvc/llvm-project?rev=109773&view=rev
Log:
PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=109773&r1=109772&r2=109773&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Thu Jul 29 13:03:33 2010
@@ -1374,7 +1374,7 @@
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,
More information about the llvm-commits
mailing list