summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-09 20:54:34 +0000
committerDevang Patel <dpatel@apple.com>2008-09-09 20:54:34 +0000
commit4b3f08bac7def05de67f5c0e9f15c53d0870c7c1 (patch)
tree1e6f7543dfc653a076e366acb8716270e365694d /lib/Transforms
parent0d95267e499082b658eaeaca85b7c5a226753f69 (diff)
downloadllvm-4b3f08bac7def05de67f5c0e9f15c53d0870c7c1.tar.gz
llvm-4b3f08bac7def05de67f5c0e9f15c53d0870c7c1.tar.bz2
llvm-4b3f08bac7def05de67f5c0e9f15c53d0870c7c1.tar.xz
fix overflow check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 50dc6d41c1..145aa92a60 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1551,8 +1551,7 @@ ICmpInst *LoopStrengthReduce::ChangeCompareStride(Loop *L, ICmpInst *Cond,
// Check stride constant and the comparision constant signs to detect
// overflow.
- if (ICmpInst::isSignedPredicate(Predicate) &&
- (CmpVal & SignBit) != (CmpSSInt & SignBit))
+ if ((CmpVal & SignBit) != (CmpSSInt & SignBit))
return Cond;
// Look for a suitable stride / iv as replacement.