From: Chris Lattner Date: Sun, 6 May 2007 07:24:03 +0000 (+0000) Subject: Fix a bug in my previous patch X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6f6f5125e2b4d92c941d2a5bd028dee308524547;p=oota-llvm.git Fix a bug in my previous patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36857 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 672fe852e69..d870d65b5d8 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5600,7 +5600,7 @@ Instruction *InstCombiner::visitICmpInstWithCastAndCast(ICmpInst &ICI) { cast(DestTy)->getBitWidth()) { Value *RHSOp = 0; if (Constant *RHSC = dyn_cast(ICI.getOperand(1))) { - RHSOp = ConstantExpr::getPtrToInt(RHSC, SrcTy); + RHSOp = ConstantExpr::getIntToPtr(RHSC, SrcTy); } else if (PtrToIntInst *RHSC = dyn_cast(ICI.getOperand(1))) { RHSOp = RHSC->getOperand(0); // If the pointer types don't match, insert a bitcast.