Changes in directory llvm/include/llvm/Analysis:
ScalarEvolutionExpander.h updated: 1.7 -> 1.8 --- Log message: Change inferred casts to explicit casts. --- Diffs of the changes: (+8 -2) ScalarEvolutionExpander.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Analysis/ScalarEvolutionExpander.h diff -u llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.7 llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.8 --- llvm/include/llvm/Analysis/ScalarEvolutionExpander.h:1.7 Sun Nov 26 19:05:09 2006 +++ llvm/include/llvm/Analysis/ScalarEvolutionExpander.h Sun Dec 3 20:44:57 2006 @@ -115,12 +115,18 @@ Value *visitTruncateExpr(SCEVTruncateExpr *S) { Value *V = expand(S->getOperand()); - return CastInst::createInferredCast(V, S->getType(), "tmp.", InsertPt); + Instruction::CastOps Opcode = (V->getType()->getPrimitiveSizeInBits() == + S->getType()->getPrimitiveSizeInBits()) ? Instruction::BitCast : + Instruction::Trunc; + return CastInst::create(Opcode, V, S->getType(), "tmp.", InsertPt); } Value *visitZeroExtendExpr(SCEVZeroExtendExpr *S) { Value *V = expandInTy(S->getOperand(),S->getType()->getUnsignedVersion()); - return CastInst::createInferredCast(V, S->getType(), "tmp.", InsertPt); + Instruction::CastOps Opcode = (V->getType()->getPrimitiveSizeInBits() == + S->getType()->getPrimitiveSizeInBits()) ? Instruction::BitCast : + Instruction::ZExt; + return CastInst::create(Opcode, V, S->getType(), "tmp.", InsertPt); } Value *visitAddExpr(SCEVAddExpr *S) { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits