summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 07:24:03 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 07:24:03 +0000
commit9b35b3e863cc92db6532e0f275f76c5ff1ff470f (patch)
tree5ba3539687a75b0c98aab391af3bf9430fbd16b6 /llvm/lib
parent1ca28f8a90e511db1e0738649691f73bd3ff791d (diff)
downloadbcm5719-llvm-9b35b3e863cc92db6532e0f275f76c5ff1ff470f.tar.gz
bcm5719-llvm-9b35b3e863cc92db6532e0f275f76c5ff1ff470f.zip
Fix a bug in my previous patch
llvm-svn: 36857
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 672fe852e69..d870d65b5d8 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud