diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-24 18:36:13 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-24 18:36:13 +0000 |
commit | bf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc (patch) | |
tree | 2514c697ab48d047ec6d2a104b35833dbf281645 /llvm/lib/Analysis/InstructionSimplify.cpp | |
parent | c9d17591d990b036df70bce2ed176357863cd417 (diff) | |
download | llvm-bf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc.zip llvm-bf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc.tar.gz llvm-bf3eeb2dfc1d7e4e4236ec1da7e20f58733b30cc.tar.bz2 |
Add some cleanup to the DataLayout changes requested by Chandler.
llvm-svn: 166607
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 016c328..7ef74f6 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -1880,9 +1880,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, // Turn icmp (ptrtoint x), (ptrtoint/constant) into a compare of the input // if the integer type is the same size as the pointer type. if (MaxRecurse && Q.TD && isa<PtrToIntInst>(LI) && - Q.TD->getPointerSizeInBits( - cast<PtrToIntInst>(LI)->getPointerAddressSpace()) == - DstTy->getPrimitiveSizeInBits()) { + Q.TD->getTypeSizeInBits(SrcTy) == DstTy->getPrimitiveSizeInBits()) { if (Constant *RHSC = dyn_cast<Constant>(RHS)) { // Transfer the cast to the constant. if (Value *V = SimplifyICmpInst(Pred, SrcOp, |