[llvm-commits] CVS: llvm/lib/Transforms/Scalar/Reassociate.cpp
Reid Spencer
reid at x10sys.com
Thu Mar 1 13:51:40 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
Reassociate.cpp updated: 1.76 -> 1.77
---
Log message:
Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
assert if the ConstantInt's value is large.
---
Diffs of the changes: (+1 -1)
Reassociate.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/Reassociate.cpp
diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.76 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.77
--- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.76 Wed Feb 14 20:26:10 2007
+++ llvm/lib/Transforms/Scalar/Reassociate.cpp Thu Mar 1 15:51:23 2007
@@ -547,7 +547,7 @@
if (CstVal->isNullValue()) { // ... * 0 -> 0
++NumAnnihil;
return CstVal;
- } else if (cast<ConstantInt>(CstVal)->getZExtValue() == 1) {
+ } else if (cast<ConstantInt>(CstVal)->isUnitValue()) {
Ops.pop_back(); // ... * 1 -> ...
}
break;
More information about the llvm-commits
mailing list