projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37eeaa7
)
Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
author
Reid Spencer
<rspencer@reidspencer.com>
Thu, 1 Mar 2007 21:51:23 +0000
(21:51 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Thu, 1 Mar 2007 21:51:23 +0000
(21:51 +0000)
assert if the ConstantInt's value is large.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34814
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/Reassociate.cpp
b/lib/Transforms/Scalar/Reassociate.cpp
index e1dbb9b0d1bad111347d387cf6f45716c021503b..aa851b290f46267e49f15d657188da9dc92ac3a3 100644
(file)
--- a/
lib/Transforms/Scalar/Reassociate.cpp
+++ b/
lib/Transforms/Scalar/Reassociate.cpp
@@
-547,7
+547,7
@@
Value *Reassociate::OptimizeExpression(BinaryOperator *I,
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;