Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.627 -> 1.628 --- Log message: Fix miscompilations of consumer-typeset, telecomm-gsm, and 176.gcc. --- Diffs of the changes: (+6 -6) InstructionCombining.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.627 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.628 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.627 Sun Feb 4 22:09:35 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Feb 4 23:57:49 2007 @@ -5675,7 +5675,7 @@ } else if (ShiftAmt1 < ShiftAmt2) { unsigned ShiftDiff = ShiftAmt2-ShiftAmt1; - // (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C1) + // (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2) if (I.getOpcode() == Instruction::Shl) { assert(ShiftOp->getOpcode() == Instruction::LShr || ShiftOp->getOpcode() == Instruction::AShr); @@ -5683,18 +5683,18 @@ BinaryOperator::createShl(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - uint64_t Mask = Ty->getBitMask() << ShiftAmt1; + uint64_t Mask = Ty->getBitMask() << ShiftAmt2; return BinaryOperator::createAnd(Shift, ConstantInt::get(Ty, Mask)); } - // (X << C1) >>u C2 --> X >>u (C2-C1) & (-1 >> C1) + // (X << C1) >>u C2 --> X >>u (C2-C1) & (-1 >> C2) if (I.getOpcode() == Instruction::LShr) { assert(ShiftOp->getOpcode() == Instruction::Shl); Instruction *Shift = BinaryOperator::createLShr(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - uint64_t Mask = Ty->getBitMask() >> ShiftAmt1; + uint64_t Mask = Ty->getBitMask() >> ShiftAmt2; return BinaryOperator::createAnd(Shift, ConstantInt::get(Ty, Mask)); } @@ -5703,7 +5703,7 @@ assert(ShiftAmt2 < ShiftAmt1); unsigned ShiftDiff = ShiftAmt1-ShiftAmt2; - // (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C1) + // (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2) if (I.getOpcode() == Instruction::Shl) { assert(ShiftOp->getOpcode() == Instruction::LShr || ShiftOp->getOpcode() == Instruction::AShr); @@ -5716,7 +5716,7 @@ return BinaryOperator::createAnd(Shift, ConstantInt::get(Ty, Mask)); } - // (X << C1) >>u C2 --> X << (C1-C2) & (-1 >> C1) + // (X << C1) >>u C2 --> X << (C1-C2) & (-1 >> C2) if (I.getOpcode() == Instruction::LShr) { assert(ShiftOp->getOpcode() == Instruction::Shl); Instruction *Shift = _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits