From b52fb876171e3670e7307fda4459ca005d49d9f5 Mon Sep 17 00:00:00 2001 From: Micah Villmow Date: Wed, 24 Oct 2012 18:36:13 +0000 Subject: 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 --- lib/Transforms/InstCombine/InstCombineCompares.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Transforms/InstCombine/InstCombineCompares.cpp') 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(LHSCI)->getPointerAddressSpace()) == + TD->getTypeSizeInBits(DestTy) == cast(DestTy)->getBitWidth()) { Value *RHSOp = 0; if (Constant *RHSC = dyn_cast(ICI.getOperand(1))) { -- cgit v1.2.3-18-g5258