Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.116 -> 1.117 --- Log message: Convert the last uses of CastInst::createInferredCast to a normal cast creation. These changes are still temporary but at least this pushes knowledge of signedness out closer to where it can be determined properly and allows signedness to be removed from VMCore. --- Diffs of the changes: (+10 -4) ExprTypeConvert.cpp | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.116 llvm/lib/Transforms/ExprTypeConvert.cpp:1.117 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.116 Mon Dec 18 02:16:27 2006 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Mon Dec 18 02:47:13 2006 @@ -228,11 +228,14 @@ Constant *Dummy = Constant::getNullValue(Ty); switch (I->getOpcode()) { - case Instruction::BitCast: + case Instruction::BitCast: { assert(VMC.NewCasts.count(ValueHandle(VMC, I)) == 0); - Res = CastInst::createInferredCast(I->getOperand(0), Ty, Name); + Instruction::CastOps opcode = CastInst::getCastOpcode(I->getOperand(0), + I->getOperand(0)->getType()->isSigned(), Ty, Ty->isSigned()); + Res = CastInst::create(opcode, I->getOperand(0), Ty, Name); VMC.NewCasts.insert(ValueHandle(VMC, Res)); break; + } case Instruction::Add: case Instruction::Sub: @@ -706,9 +709,12 @@ Constant::getNullValue(NewTy) : 0; switch (I->getOpcode()) { - case Instruction::BitCast: - Res = CastInst::createInferredCast(NewVal, I->getType(), Name); + case Instruction::BitCast: { + Instruction::CastOps opcode = CastInst::getCastOpcode(NewVal, + NewVal->getType()->isSigned(), I->getType(), I->getType()->isSigned()); + Res = CastInst::create(opcode, NewVal, I->getType(), Name); break; + } case Instruction::Add: case Instruction::Sub: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits