[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Reid Spencer
reid at x10sys.com
Wed Nov 1 13:53:33 PST 2006
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.55 -> 1.56
---
Log message:
Make ScalarEvolution actually use a ZeroExtend expression instead of
having SCZeroExtendExpr be equivalent to SCTruncate
---
Diffs of the changes: (+2 -2)
ScalarEvolution.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.55 llvm/lib/Analysis/ScalarEvolution.cpp:1.56
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.55 Thu Oct 26 01:15:43 2006
+++ llvm/lib/Analysis/ScalarEvolution.cpp Wed Nov 1 15:53:12 2006
@@ -229,7 +229,7 @@
SCEVZeroExtendExpr*> > SCEVZeroExtends;
SCEVZeroExtendExpr::SCEVZeroExtendExpr(const SCEVHandle &op, const Type *ty)
- : SCEV(scTruncate), Op(op), Ty(ty) {
+ : SCEV(scZeroExtend), Op(op), Ty(ty) {
assert(Op->getType()->isInteger() && Ty->isInteger() &&
Ty->isUnsigned() &&
"Cannot zero extend non-integer value!");
@@ -1359,7 +1359,7 @@
return SCEVTruncateExpr::get(getSCEV(CI->getOperand(0)),
CI->getType()->getUnsignedVersion());
if (SrcTy->isUnsigned() &&
- SrcTy->getPrimitiveSize() > DestTy->getPrimitiveSize())
+ SrcTy->getPrimitiveSize() <= DestTy->getPrimitiveSize())
return SCEVZeroExtendExpr::get(getSCEV(CI->getOperand(0)),
CI->getType()->getUnsignedVersion());
}
More information about the llvm-commits
mailing list