Author: lattner Date: Tue Dec 11 21:56:54 2007 New Revision: 44907 URL: http://llvm.org/viewvc/llvm-project?rev=44907&view=rev Log: Fix a bug in my previous patch, thanks to Jay Foad for pointing this out and correcting the patch!
Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=44907&r1=44906&r2=44907&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Tue Dec 11 21:56:54 2007 @@ -427,10 +427,10 @@ // there is a truncation or extension that we aren't modeling. if ((CE0->getOpcode() == Instruction::IntToPtr && CE0->getOperand(0)->getType() == IntPtrTy && - CE0->getOperand(1)->getType() == IntPtrTy) || + Ops[1]->getOperand(0)->getType() == IntPtrTy) || (CE0->getOpcode() == Instruction::PtrToInt && CE0->getType() == IntPtrTy && - CE0->getOperand(0)->getType() == CE0->getOperand(1)->getType())) { + CE0->getOperand(0)->getType() == Ops[1]->getOperand(0)->getType())) { Constant *NewOps[] = { CE0->getOperand(0), cast<ConstantExpr>(Ops[1])->getOperand(0) }; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits