Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.657 -> 1.658 --- Log message: For expression like "APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth)", to handle ShiftAmt == BitWidth situation, use zextOrCopy() instead of zext(). --- Diffs of the changes: (+3 -3) InstructionCombining.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.657 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.658 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.657 Mon Mar 12 21:23:10 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 13 01:40:59 2007 @@ -1995,7 +1995,7 @@ RHSKnownZero <<= ShiftAmt; RHSKnownOne <<= ShiftAmt; // low bits known zero. - RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zext(BitWidth); + RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth); } break; case Instruction::LShr: @@ -2012,7 +2012,7 @@ assert((RHSKnownZero & RHSKnownOne) == 0 && "Bits known to be one AND zero?"); // Compute the new bits that are at the top now. - APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zext(BitWidth).shl( + APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth).shl( BitWidth - ShiftAmt)); RHSKnownZero &= TypeMask; RHSKnownOne &= TypeMask; @@ -2046,7 +2046,7 @@ assert((RHSKnownZero & RHSKnownOne) == 0 && "Bits known to be one AND zero?"); // Compute the new bits that are at the top now. - APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zext(BitWidth).shl( + APInt HighBits(APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth).shl( BitWidth - ShiftAmt)); RHSKnownZero &= TypeMask; RHSKnownOne &= TypeMask; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits