diff options
Diffstat (limited to 'lib/Target/XCore/XCoreISelLowering.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreISelLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index 9e7816e21f..eaa745ba9b 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -477,7 +477,8 @@ LowerLOAD(SDValue Op, SelectionDAG &DAG) const { } // Lower to a call to __misaligned_load(BasePtr). - Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext()); + unsigned AS = LD->getAddressSpace(); + Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext(), AS); TargetLowering::ArgListTy Args; TargetLowering::ArgListEntry Entry; @@ -536,7 +537,8 @@ LowerSTORE(SDValue Op, SelectionDAG &DAG) const } // Lower to a call to __misaligned_store(BasePtr, Value). - Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext()); + unsigned AS = ST->getAddressSpace(); + Type *IntPtrTy = getDataLayout()->getIntPtrType(*DAG.getContext(), AS); TargetLowering::ArgListTy Args; TargetLowering::ArgListEntry Entry; |