Changes in directory llvm/lib/Analysis:
ConstantRange.cpp updated: 1.18 -> 1.19 --- Log message: Change inferred casts to explicit casts. --- Diffs of the changes: (+5 -9) ConstantRange.cpp | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) Index: llvm/lib/Analysis/ConstantRange.cpp diff -u llvm/lib/Analysis/ConstantRange.cpp:1.18 llvm/lib/Analysis/ConstantRange.cpp:1.19 --- llvm/lib/Analysis/ConstantRange.cpp:1.18 Tue Nov 28 19:14:00 2006 +++ llvm/lib/Analysis/ConstantRange.cpp Sun Dec 3 20:46:44 2006 @@ -293,14 +293,9 @@ Constant *Lower = getLower(); Constant *Upper = getUpper(); - if (Lower->getType()->isInteger() && !Lower->getType()->isUnsigned()) { - // Ensure we are doing a ZERO extension even if the input range is signed. - Lower = ConstantExpr::getCast(Lower, Ty->getUnsignedVersion()); - Upper = ConstantExpr::getCast(Upper, Ty->getUnsignedVersion()); - } - return ConstantRange(ConstantExpr::getCast(Lower, Ty), - ConstantExpr::getCast(Upper, Ty)); + return ConstantRange(ConstantExpr::getCast(Instruction::ZExt, Lower, Ty), + ConstantExpr::getCast(Instruction::ZExt, Upper, Ty)); } /// truncate - Return a new range in the specified integer type, which must be @@ -314,8 +309,9 @@ if (isFullSet() || getSetSize() >= Size) return ConstantRange(getType()); - return ConstantRange(ConstantExpr::getCast(getLower(), Ty), - ConstantExpr::getCast(getUpper(), Ty)); + return ConstantRange( + ConstantExpr::getCast(Instruction::Trunc, getLower(), Ty), + ConstantExpr::getCast(Instruction::Trunc, getUpper(), Ty)); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits