aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorNicola Zaghen <nicola.zaghen@imgtec.com>2019-12-12 10:25:14 +0000
committerNicola Zaghen <nicola.zaghen@imgtec.com>2019-12-12 10:29:54 +0000
commitf798eb21eca97dc44ed40da52ece22780fb74230 (patch)
treefad09859cc0f2aef457f421278e70d5e5f9ed037 /llvm/lib/Analysis/InlineCost.cpp
parent9c48c2f9c477007234c5bdad0bc8c0969afa0724 (diff)
downloadllvm-f798eb21eca97dc44ed40da52ece22780fb74230.zip
llvm-f798eb21eca97dc44ed40da52ece22780fb74230.tar.gz
llvm-f798eb21eca97dc44ed40da52ece22780fb74230.tar.bz2
Temporarily Revert "[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same."
This reverts commit 5f6208778ff92567c57d7c1e2e740c284d7e69a5. This caused failures in Transforms/PhaseOrdering/scev-custom-dl.ll const: Assertion `getBitWidth() == CR.getBitWidth() && "ConstantRange types don't agree!"' failed.
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 24af43a..55ce940 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1678,8 +1678,8 @@ ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) {
assert(V->getType()->isPointerTy() && "Unexpected operand type!");
} while (Visited.insert(V).second);
- Type *IdxPtrTy = DL.getIndexType(V->getType());
- return cast<ConstantInt>(ConstantInt::get(IdxPtrTy, Offset));
+ Type *IntPtrTy = DL.getIntPtrType(V->getContext(), AS);
+ return cast<ConstantInt>(ConstantInt::get(IntPtrTy, Offset));
}
/// Find dead blocks due to deleted CFG edges during inlining.