diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 07:24:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 07:24:03 +0000 |
commit | 6f6f5125e2b4d92c941d2a5bd028dee308524547 (patch) | |
tree | 0b7133a9ac747b31750f009814c4b8bd770937ca /lib/Transforms | |
parent | e07c15c734fcac9f6a82ae20a93b18799d6ca992 (diff) | |
download | llvm-6f6f5125e2b4d92c941d2a5bd028dee308524547.tar.gz llvm-6f6f5125e2b4d92c941d2a5bd028dee308524547.tar.bz2 llvm-6f6f5125e2b4d92c941d2a5bd028dee308524547.tar.xz |
Fix a bug in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 672fe852e6..d870d65b5d 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5600,7 +5600,7 @@ Instruction *InstCombiner::visitICmpInstWithCastAndCast(ICmpInst &ICI) { cast<IntegerType>(DestTy)->getBitWidth()) { Value *RHSOp = 0; if (Constant *RHSC = dyn_cast<Constant>(ICI.getOperand(1))) { - RHSOp = ConstantExpr::getPtrToInt(RHSC, SrcTy); + RHSOp = ConstantExpr::getIntToPtr(RHSC, SrcTy); } else if (PtrToIntInst *RHSC = dyn_cast<PtrToIntInst>(ICI.getOperand(1))) { RHSOp = RHSC->getOperand(0); // If the pointer types don't match, insert a bitcast. |