[llvm-commits] [llvm] r100274 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Chris Lattner sabre at nondot.org
Fri Apr 2 23:13:12 PDT 2010


Author: lattner
Date: Sat Apr  3 01:13:12 2010
New Revision: 100274

URL: http://llvm.org/viewvc/llvm-project?rev=100274&view=rev
Log:
strength reduce a ridiculous use of APInt.

Modified:
    llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=100274&r1=100273&r2=100274&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Sat Apr  3 01:13:12 2010
@@ -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;





More information about the llvm-commits mailing list