diff options
Diffstat (limited to 'lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | lib/Transforms/Scalar/JumpThreading.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index 4bbde1397c..7cd1602e92 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -213,11 +213,12 @@ static Constant *GetResultOfComparison(CmpInst::Predicate pred, return ConstantExpr::getCompare(pred, CLHS, CRHS); if (LHS == RHS) - if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType())) + if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType())) { if (ICmpInst::isTrueWhenEqual(pred)) return ConstantInt::getTrue(LHS->getContext()); else return ConstantInt::getFalse(LHS->getContext()); + } return 0; } |