summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 18:36:13 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 18:36:13 +0000
commitb52fb876171e3670e7307fda4459ca005d49d9f5 (patch)
treee3327db438225073f62c4f4733c814082c9abfe5 /lib/Transforms/InstCombine/InstCombineCompares.cpp
parent199063ea37d8cc651a20ab00eef4326cd9331371 (diff)
downloadllvm-b52fb876171e3670e7307fda4459ca005d49d9f5.tar.gz
llvm-b52fb876171e3670e7307fda4459ca005d49d9f5.tar.bz2
llvm-b52fb876171e3670e7307fda4459ca005d49d9f5.tar.xz
Add some cleanup to the DataLayout changes requested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCompares.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 057496d210..055c3b1514 100644
--- a/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -1554,8 +1554,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(
- cast<PtrToIntInst>(LHSCI)->getPointerAddressSpace()) ==
+ TD->getTypeSizeInBits(DestTy) ==
cast<IntegerType>(DestTy)->getBitWidth()) {
Value *RHSOp = 0;
if (Constant *RHSC = dyn_cast<Constant>(ICI.getOperand(1))) {