diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-30 21:06:18 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-30 21:06:18 +0000 |
commit | 06adecabe74d3836931f289034b7ff5dd556acad (patch) | |
tree | 2430da25e4be6ddef0b4cdbfdaf7911a2de7f18a /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | 6ca84e3758c3a74982fe3cfb1ae0ecca59371388 (diff) | |
download | bcm5719-llvm-06adecabe74d3836931f289034b7ff5dd556acad.tar.gz bcm5719-llvm-06adecabe74d3836931f289034b7ff5dd556acad.zip |
Constant fold ptrtoint + compare with address spaces
llvm-svn: 191699
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 402f8c33029..f691350fed8 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -1782,7 +1782,7 @@ Instruction *InstCombiner::visitICmpInstWithCastAndCast(ICmpInst &ICI) { // Turn icmp (ptrtoint x), (ptrtoint/c) into a compare of the input if the // integer type is the same size as the pointer type. if (TD && LHSCI->getOpcode() == Instruction::PtrToInt && - TD->getPointerSizeInBits() == DestTy->getIntegerBitWidth()) { + TD->getPointerTypeSizeInBits(SrcTy) == DestTy->getIntegerBitWidth()) { Value *RHSOp = 0; if (Constant *RHSC = dyn_cast<Constant>(ICI.getOperand(1))) { RHSOp = ConstantExpr::getIntToPtr(RHSC, SrcTy); |