[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp

Reid Spencer reid at x10sys.com
Thu Mar 1 09:17:37 PST 2007



Changes in directory llvm/lib/Analysis:

ScalarEvolution.cpp updated: 1.99 -> 1.100
---
Log message:

Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth.


---
Diffs of the changes:  (+1 -0)

 ScalarEvolution.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.99 llvm/lib/Analysis/ScalarEvolution.cpp:1.100
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.99	Thu Mar  1 01:54:15 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp	Thu Mar  1 11:17:21 2007
@@ -1405,6 +1405,7 @@
         APInt CommonFact = GetConstantFactor(LHS);
         assert(!CommonFact.isMinValue() &&
                "Common factor should at least be 1!");
+        CommonFact.zextOrTrunc(CI->getValue().getBitWidth());
         if (CommonFact.ugt(CI->getValue())) {
           // If the LHS is a multiple that is larger than the RHS, use +.
           return SCEVAddExpr::get(LHS,






More information about the llvm-commits mailing list