fix a logic error that would cause LVI-JT to miscompile
authorChris Lattner <sabre@nondot.org>
Sun, 15 Nov 2009 20:01:24 +0000 (20:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Nov 2009 20:01:24 +0000 (20:01 +0000)
some conditionals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88868 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LazyValueInfo.cpp

index bcd972eac34671c7d64990be9c236f1c5121bc42..3148acaac4e67e85f71213cb637698a614d2c804 100644 (file)
@@ -550,7 +550,7 @@ LazyValueInfo::getPredicateOnEdge(unsigned Pred, Value *V, Constant *C,
         return False;
     } else if (Pred == ICmpInst::ICMP_NE) {
       // !C1 != C -> true iff C1 == C.
-      Res = ConstantFoldCompareInstOperands(ICmpInst::ICMP_EQ,
+      Res = ConstantFoldCompareInstOperands(ICmpInst::ICMP_NE,
                                             Result.getNotConstant(), C, TD);
       if (Res->isNullValue())
         return True;