diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-15 20:01:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-15 20:01:24 +0000 |
commit | 5553a3a5108f2942672cfac6f7bcf433acaf89ff (patch) | |
tree | 62562d6d3d5ad247a17676296327599b9b8bb711 | |
parent | e5642812d388c29c71e078c5599db350c3dbc79a (diff) | |
download | external_llvm-5553a3a5108f2942672cfac6f7bcf433acaf89ff.zip external_llvm-5553a3a5108f2942672cfac6f7bcf433acaf89ff.tar.gz external_llvm-5553a3a5108f2942672cfac6f7bcf433acaf89ff.tar.bz2 |
fix a logic error that would cause LVI-JT to miscompile
some conditionals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88868 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/LazyValueInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index bcd972e..3148aca 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -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; |