summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-16 20:50:54 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-16 20:50:54 +0000
commitdfb3e7092ebcb919c26f63e98a1bd14647671dea (patch)
tree09f368b8e4f7895f2b8e16ed80e75ce599471348 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent19231e630e4ccf8b8ced1c9a7fe65f596a160a5c (diff)
downloadbcm5719-llvm-dfb3e7092ebcb919c26f63e98a1bd14647671dea.tar.gz
bcm5719-llvm-dfb3e7092ebcb919c26f63e98a1bd14647671dea.zip
Fix assert on unaligned access to global with different address space size.
llvm-svn: 194934
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index bac06ccaf57..85e5494b8e0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -6372,7 +6372,7 @@ unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const {
int64_t GVOffset = 0;
const TargetLowering *TLI = TM.getTargetLowering();
if (TLI->isGAPlusOffset(Ptr.getNode(), GV, GVOffset)) {
- unsigned PtrWidth = TLI->getPointerTy().getSizeInBits();
+ unsigned PtrWidth = TLI->getPointerTypeSizeInBits(GV->getType());
APInt KnownZero(PtrWidth, 0), KnownOne(PtrWidth, 0);
llvm::ComputeMaskedBits(const_cast<GlobalValue*>(GV), KnownZero, KnownOne,
TLI->getDataLayout());
OpenPOWER on IntegriCloud