aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-03 06:13:12 +0000
committerChris Lattner <sabre@nondot.org>2010-04-03 06:13:12 +0000
commit9698c1985f8b4f461a01a908be60f9fd14a342ec (patch)
tree021527b3bbb8b5a3c28f3bb80928a9f47254453a /lib/Transforms
parentca703bd56ba1f717b3735c6889334c319ca005b1 (diff)
strength reduce a ridiculous use of APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index a6d1843318..b5fdd0c4a1 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -632,8 +632,7 @@ static bool CanUseSIToFP(ConstantFP *InitV, ConstantFP *ExitV,
return true;
// If the iteration range can be handled by SIToFPInst then use it.
- APInt Max = APInt::getSignedMaxValue(32);
- if (Max.getZExtValue() > static_cast<uint64_t>(abs64(intEV - intIV)))
+ if (abs64(intEV - intIV) < INT32_MAX)
return true;
return false;