diff options
| author | Devang Patel <dpatel@apple.com> | 2008-09-09 20:54:34 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-09-09 20:54:34 +0000 |
| commit | 92c536770502900a9ddb111c7ec7a16708e56e50 (patch) | |
| tree | 1e0ada1f3200300a55ab6cd1b50c2fd991bc4e56 /llvm/lib | |
| parent | 0bc8e86d6e06d62630e20a145a0e5de33169be8b (diff) | |
| download | bcm5719-llvm-92c536770502900a9ddb111c7ec7a16708e56e50.tar.gz bcm5719-llvm-92c536770502900a9ddb111c7ec7a16708e56e50.zip | |
fix overflow check.
llvm-svn: 56011
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 50dc6d41c1e..145aa92a60e 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/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. |

