[llvm] r364766 - AMDGPU/GlobalISel: Fail on store to 32-bit address space
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 06:37:39 PDT 2019
Author: arsenm
Date: Mon Jul 1 06:37:39 2019
New Revision: 364766
URL: http://llvm.org/viewvc/llvm-project?rev=364766&view=rev
Log:
AMDGPU/GlobalISel: Fail on store to 32-bit address space
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-implicit-def.mir
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp?rev=364766&r1=364765&r2=364766&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp Mon Jul 1 06:37:39 2019
@@ -549,6 +549,12 @@ bool AMDGPUInstructionSelector::selectG_
MachineFunction *MF = BB->getParent();
MachineRegisterInfo &MRI = MF->getRegInfo();
DebugLoc DL = I.getDebugLoc();
+ unsigned PtrSize = RBI.getSizeInBits(I.getOperand(1).getReg(), MRI, TRI);
+ if (PtrSize != 64) {
+ LLVM_DEBUG(dbgs() << "Unhandled address space\n");
+ return false;
+ }
+
unsigned StoreSize = RBI.getSizeInBits(I.getOperand(0).getReg(), MRI, TRI);
unsigned Opcode;
Modified: llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-implicit-def.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-implicit-def.mir?rev=364766&r1=364765&r2=364766&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-implicit-def.mir (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/GlobalISel/inst-select-implicit-def.mir Mon Jul 1 06:37:39 2019
@@ -119,9 +119,9 @@ regBankSelected: true
body: |
bb.0:
; GCN-LABEL: name: implicit_def_p3_vgpr
- ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
- ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4, implicit $exec
- ; GCN: FLAT_STORE_DWORD [[DEF]], [[V_MOV_B32_e32_]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr
+ ; GCN: [[DEF:%[0-9]+]]:vgpr(p3) = G_IMPLICIT_DEF
+ ; GCN: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 4
+ ; GCN: G_STORE [[C]](s32), [[DEF]](p3) :: (store 4, addrspace 1)
%0:vgpr(p3) = G_IMPLICIT_DEF
%1:vgpr(s32) = G_CONSTANT i32 4
G_STORE %1, %0 :: (store 4, addrspace 1)
More information about the llvm-commits
mailing list