Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.123 -> 1.124 --- Log message: Changes to support making the shift instructions be true BinaryOperators. This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. --- Diffs of the changes: (+5 -5) ExprTypeConvert.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.123 llvm/lib/Transforms/ExprTypeConvert.cpp:1.124 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.123 Thu Feb 1 13:14:51 2007 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Thu Feb 1 20:16:22 2007 @@ -251,8 +251,8 @@ case Instruction::Shl: case Instruction::LShr: case Instruction::AShr: - Res = new ShiftInst(cast<ShiftInst>(I)->getOpcode(), Dummy, - I->getOperand(1), Name); + Res = BinaryOperator::create(cast<BinaryOperator>(I)->getOpcode(), Dummy, + I->getOperand(1), Name); VMC.ExprMap[I] = Res; Res->setOperand(0, ConvertExpressionToType(I->getOperand(0), Ty, VMC, TD)); break; @@ -472,9 +472,9 @@ } return false; } + case Instruction::Shl: case Instruction::LShr: case Instruction::AShr: - case Instruction::Shl: if (I->getOperand(1) == V) return false; // Cannot change shift amount type if (!Ty->isInteger()) return false; return ValueConvertibleToType(I, Ty, CTMap, TD); @@ -747,8 +747,8 @@ case Instruction::LShr: case Instruction::AShr: assert(I->getOperand(0) == OldVal); - Res = new ShiftInst(cast<ShiftInst>(I)->getOpcode(), NewVal, - I->getOperand(1), Name); + Res = BinaryOperator::create(cast<BinaryOperator>(I)->getOpcode(), NewVal, + I->getOperand(1), Name); break; case Instruction::Free: // Free can free any pointer type! _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits