commit | 9698c1985f8b4f461a01a908be60f9fd14a342ec | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Sat Apr 03 06:13:12 2010 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Sat Apr 03 06:13:12 2010 +0000 |
tree | 021527b3bbb8b5a3c28f3bb80928a9f47254453a | |
parent | ca703bd56ba1f717b3735c6889334c319ca005b1 [diff] [blame] |
strength reduce a ridiculous use of APInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100274 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@ 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;