[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
Reid Spencer
reid at x10sys.com
Wed Feb 28 10:57:51 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
CorrelatedExprs.cpp updated: 1.52 -> 1.53
---
Log message:
For PR1205: http://llvm.org/PR1205 :
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.
---
Diffs of the changes: (+5 -4)
CorrelatedExprs.cpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.52 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.53
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.52 Mon Feb 5 17:32:05 2007
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Wed Feb 28 12:57:32 2007
@@ -1150,7 +1150,7 @@
//
if (ConstantInt *C = dyn_cast<ConstantInt>(Op1)) {
// Check to see if we already know the result of this comparison...
- ConstantRange R = ConstantRange(predicate, C);
+ ConstantRange R = ConstantRange(predicate, C->getValue());
ConstantRange Int = R.intersectWith(Op0VI->getBounds(),
ICmpInst::isSignedPredicate(ICmpInst::Predicate(predicate)));
@@ -1197,7 +1197,7 @@
if (ConstantInt *C = dyn_cast<ConstantInt>(Val))
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
Op <= ICmpInst::LAST_ICMP_PREDICATE)
- if (ConstantRange(Op, C).intersectWith(VI.getBounds(),
+ if (ConstantRange(Op, C->getValue()).intersectWith(VI.getBounds(),
ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op))).isEmptySet())
return true;
@@ -1255,8 +1255,9 @@
if (ConstantInt *C = dyn_cast<ConstantInt>(Val))
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
Op <= ICmpInst::LAST_ICMP_PREDICATE)
- VI.getBounds() = ConstantRange(Op, C).intersectWith(VI.getBounds(),
- ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op)));
+ VI.getBounds() =
+ ConstantRange(Op, C->getValue()).intersectWith(VI.getBounds(),
+ ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op)));
switch (Rel) {
default: assert(0 && "Unknown prior value!");
More information about the llvm-commits
mailing list