[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
Reid Spencer
reid at x10sys.com
Wed Feb 28 23:54:40 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
CorrelatedExprs.cpp updated: 1.55 -> 1.56
---
Log message:
Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
---
Diffs of the changes: (+5 -6)
CorrelatedExprs.cpp | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.55 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.56
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.55 Wed Feb 28 16:03:51 2007
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Thu Mar 1 01:54:15 2007
@@ -1156,8 +1156,7 @@
// Check to see if we already know the result of this comparison...
ICmpInst::Predicate ipred = ICmpInst::Predicate(predicate);
ConstantRange R = ICmpInst::makeConstantRange(ipred, C->getValue());
- ConstantRange Int = R.intersectWith(Op0VI->getBounds(),
- ICmpInst::isSignedPredicate(ipred));
+ ConstantRange Int = R.intersectWith(Op0VI->getBounds());
// If the intersection of the two ranges is empty, then the condition
// could never be true!
@@ -1203,8 +1202,8 @@
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
Op <= ICmpInst::LAST_ICMP_PREDICATE) {
ICmpInst::Predicate ipred = ICmpInst::Predicate(Op);
- if (ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith(
- VI.getBounds(), ICmpInst::isSignedPredicate(ipred)).isEmptySet())
+ if (ICmpInst::makeConstantRange(ipred, C->getValue())
+ .intersectWith(VI.getBounds()).isEmptySet())
return true;
}
@@ -1264,8 +1263,8 @@
Op <= ICmpInst::LAST_ICMP_PREDICATE) {
ICmpInst::Predicate ipred = ICmpInst::Predicate(Op);
VI.getBounds() =
- ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith(
- VI.getBounds(), ICmpInst::isSignedPredicate(ipred));
+ ICmpInst::makeConstantRange(ipred, C->getValue())
+ .intersectWith(VI.getBounds());
}
switch (Rel) {
More information about the llvm-commits
mailing list