From 92aa2d0b95f956f726b7f5cf10313a7bba82544e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 3 Apr 2010 06:13:12 +0000 Subject: strength reduce a ridiculous use of APInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100274 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/IndVarSimplify.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Transforms') diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index a6d1843..b5fdd0c 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(abs64(intEV - intIV))) + if (abs64(intEV - intIV) < INT32_MAX) return true; return false; -- cgit v1.1