[llvm] [AMDGPU][GlobalISel] Allow selecting buffer_load/store of pointers (PR #110714)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 11:50:56 PDT 2024


================
@@ -5982,9 +5994,21 @@ bool AMDGPULegalizerInfo::legalizeBufferLoad(MachineInstr &MI,
   // Make addrspace 8 pointers loads into 4xs32 loads here, so the rest of the
   // logic doesn't have to handle that case.
   if (hasBufferRsrcWorkaround(Ty)) {
+    Observer.changingInstr(MI);
     Ty = castBufferRsrcFromV4I32(MI, B, MRI, 0);
+    Observer.changedInstr(MI);
     Dst = MI.getOperand(0).getReg();
+    B.setInsertPt(B.getMBB(), MI);
   }
+  if (shouldBitcastLoadStoreType(ST, Ty, MemTy) || Ty.isPointerVector()) {
----------------
arsenm wrote:

Ty.isPointerVector should be redundant here too 

https://github.com/llvm/llvm-project/pull/110714


More information about the llvm-commits mailing list