[llvm] [AMDGPU] Support true16 spill restore with sram-ecc (PR #165320)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 04:09:02 PDT 2025


================
@@ -2505,7 +2524,9 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
       unsigned Opc;
       if (MI->getOpcode() == AMDGPU::SI_SPILL_V16_RESTORE) {
         assert(ST.enableFlatScratch() && "Flat Scratch is not enabled!");
-        Opc = AMDGPU::SCRATCH_LOAD_SHORT_D16_SADDR_t16;
+        Opc = ST.d16PreservesUnusedBits()
+                  ? AMDGPU::SCRATCH_LOAD_SHORT_D16_SADDR_t16
+                  : AMDGPU::SCRATCH_LOAD_UBYTE_SADDR;
----------------
jayfoad wrote:

Is this just a typo?

```suggestion
                  : AMDGPU::SCRATCH_LOAD_USHORT_SADDR;
```

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


More information about the llvm-commits mailing list