summaryrefslogtreecommitdiffstats
path: root/clang
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 /clang
parent9c48c2f9c477007234c5bdad0bc8c0969afa0724 (diff)
downloadbcm5719-llvm-f798eb21eca97dc44ed40da52ece22780fb74230.tar.gz
bcm5719-llvm-f798eb21eca97dc44ed40da52ece22780fb74230.zip
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 'clang')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index b8846162508..b1dcbc51f58 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -3264,10 +3264,10 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF,
expr->getRHS()))
return CGF.Builder.CreateIntToPtr(index, pointer->getType());
- if (width != DL.getIndexTypeSizeInBits(PtrTy)) {
+ if (width != DL.getTypeSizeInBits(PtrTy)) {
// Zero-extend or sign-extend the pointer value according to
// whether the index is signed or not.
- index = CGF.Builder.CreateIntCast(index, DL.getIndexType(PtrTy), isSigned,
+ index = CGF.Builder.CreateIntCast(index, DL.getIntPtrType(PtrTy), isSigned,
"idx.ext");
}
OpenPOWER on IntegriCloud