diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-16 20:50:54 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-16 20:50:54 +0000 |
commit | e6e811277f045ee3d61cd62622d71005c47eb48d (patch) | |
tree | 7d3d8fa4880b377e58779495a1657d0777863825 /lib/CodeGen | |
parent | 4fe5b640ee935f983db9445dc9fdb4009d4fa639 (diff) | |
download | external_llvm-e6e811277f045ee3d61cd62622d71005c47eb48d.zip external_llvm-e6e811277f045ee3d61cd62622d71005c47eb48d.tar.gz external_llvm-e6e811277f045ee3d61cd62622d71005c47eb48d.tar.bz2 |
Fix assert on unaligned access to global with different address space size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index bac06cc..85e5494 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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()); |