mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user