Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.70 -> 1.71 --- Log message: Get even more accurate on the casting. --- Diffs of the changes: (+5 -8) ScalarEvolution.cpp | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.70 llvm/lib/Analysis/ScalarEvolution.cpp:1.71 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.70 Mon Dec 11 23:04:59 2006 +++ llvm/lib/Analysis/ScalarEvolution.cpp Tue Dec 12 03:17:50 2006 @@ -1567,8 +1567,7 @@ ConstantInt *CompVal = RHSC->getValue(); const Type *RealTy = ExitCond->getOperand(0)->getType(); CompVal = dyn_cast<ConstantInt>( - ConstantExpr::getIntegerCast(CompVal, RealTy, - CompVal->getType()->isSigned())); + ConstantExpr::getBitCast(CompVal, RealTy)); if (CompVal) { // Form the constant range. ConstantRange CompRange(Cond, CompVal); @@ -1577,12 +1576,10 @@ // range. if (CompRange.getLower()->getType()->isSigned()) { const Type *NewTy = RHSC->getValue()->getType(); - Constant *NewL = - ConstantExpr::getIntegerCast(CompRange.getLower(), NewTy, - CompRange.getLower()->getType()->isSigned()); - Constant *NewU = - ConstantExpr::getIntegerCast(CompRange.getUpper(), NewTy, - CompRange.getUpper()->getType()->isSigned()); + Constant *NewL = ConstantExpr::getBitCast(CompRange.getLower(), + NewTy); + Constant *NewU = ConstantExpr::getBitCast(CompRange.getUpper(), + NewTy); CompRange = ConstantRange(NewL, NewU); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits