[llvm] [AMDGPU] Reject sub-dword format buffer loads and stores (PR #209703)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 03:50:02 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 138499 tests passed
* 3542 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -global-isel -global-isel-abort=2 -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=instruction-select -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=UNPACKED C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -global-isel -global-isel-abort=2 -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=instruction-select -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=UNPACKED 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll:10:19: error: UNPACKED-NEXT: expected string not found in input
# |  ; UNPACKED-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
# |                   ^
# | <stdin>:145:2: note: scanning from here
# |  
# |  ^
# | <stdin>:145:2: note: pattern attempts to capture variables: "COPY"
# |  
# |  ^
# | <stdin>:146:2: note: possible intended match here
# |  %6:_(i32) = COPY $vgpr0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll:43:19: error: UNPACKED-NEXT: expected string not found in input
# |  ; UNPACKED-NEXT: successors: %bb.2(0x80000000)
# |                   ^
# | <stdin>:269:21: note: scanning from here
# |  bb.1 (%ir-block.0):
# |                     ^
# | <stdin>:282:61: note: possible intended match here
# |  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8)
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll:150:19: error: UNPACKED-NEXT: expected string not found in input
# |  ; UNPACKED-NEXT: successors: %bb.2(0x80000000)
# |                   ^
# | <stdin>:395:21: note: scanning from here
# |  bb.1 (%ir-block.0):
# |                     ^
# | <stdin>:408:61: note: possible intended match here
# |  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8)
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll:263:19: error: UNPACKED-NEXT: expected string not found in input
# |  ; UNPACKED-NEXT: successors: %bb.2(0x80000000)
# |                   ^
# | <stdin>:521:21: note: scanning from here
# |  bb.1 (%ir-block.0):
# |                     ^
# | <stdin>:534:61: note: possible intended match here
# |  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8)
# |                                                             ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.ptr.tbuffer.store.i8.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           140:  isWholeWaveFunction: false 
# |           141:  minNumAGPRs: 4294967295 
# |           142: body: | 
# |           143:  bb.1 (%ir-block.0): 
# |           144:  liveins: $sgpr2, $sgpr3, $sgpr4, $sgpr5, $sgpr6, $vgpr0, $vgpr1 
# |           145:   
# | next:10'0      {   search range start (exclusive)
# | next:10'1          error: no match found in search range
# | next:10'2          pattern attempts to capture variables: "COPY"
# |           146:  %6:_(i32) = COPY $vgpr0 
# | next:10'3       ?                         possible intended match
# |           147:  %5:_(i16) = G_TRUNC %6(i32) 
# |           148:  %0:_(i8) = G_TRUNC %5(i16) 
# |           149:  %7:_(i32) = COPY $sgpr2 
# |           150:  %8:_(i32) = COPY $sgpr3 
# |           151:  %9:_(i32) = COPY $sgpr4 
# |           152:  %10:_(i32) = COPY $sgpr5 
# |           153:  %1:_(p8) = G_MERGE_VALUES %7(i32), %8(i32), %9(i32), %10(i32) 
# |           154:  %2:_(i32) = COPY $vgpr1 
# |           155:  %3:_(i32) = COPY $sgpr6 
# |           156:  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8) 
# |           157:  S_ENDPGM 0 
# |           158: ... 
# |           159: --- 
# |           160: name: raw_tbuffer_store_i8__vgpr_rsrc__vgpr_voffset__sgpr_soffset 
# | next:10'4                                                                       }  search range end (exclusive)
# |           161: alignment: 4 
# |           162: exposesReturnsTwice: false 
# |           163: legalized: true 
# |           164: regBankSelected: true 
# |           165: selected: true 
# |             .
# |             .
# |             .
# |           264:  scratchReservedForDynamicVGPRs: 0 
# |           265:  numKernargPreloadSGPRs: 0 
# |           266:  isWholeWaveFunction: false 
# |           267:  minNumAGPRs: 4294967295 
# |           268: body: | 
# |           269:  bb.1 (%ir-block.0): 
# | next:43'0                         {   search range start (exclusive)
# | next:43'1                             error: no match found in search range
# |           270:  liveins: $sgpr2, $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5 
# |           271:   
# |           272:  %6:_(i32) = COPY $vgpr0 
# |           273:  %5:_(i16) = G_TRUNC %6(i32) 
# |           274:  %0:_(i8) = G_TRUNC %5(i16) 
# |           275:  %7:_(i32) = COPY $vgpr1 
# |           276:  %8:_(i32) = COPY $vgpr2 
# |           277:  %9:_(i32) = COPY $vgpr3 
# |           278:  %10:_(i32) = COPY $vgpr4 
# |           279:  %1:_(p8) = G_MERGE_VALUES %7(i32), %8(i32), %9(i32), %10(i32) 
# |           280:  %2:_(i32) = COPY $vgpr5 
# |           281:  %3:_(i32) = COPY $sgpr2 
# |           282:  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8) 
# | next:43'2                                                                  ?                                                                                                                   possible intended match
# |           283:  S_ENDPGM 0 
# |           284: ... 
# |           285: --- 
# |           286: name: raw_tbuffer_store_i8__vgpr_rsrc__vgpr_voffset__vgpr_soffset 
# | next:43'3                                                                       }  search range end (exclusive)
# |           287: alignment: 4 
# |           288: exposesReturnsTwice: false 
# |           289: legalized: true 
# |           290: regBankSelected: true 
# |           291: selected: true 
# |             .
# |             .
# |             .
# |           390:  scratchReservedForDynamicVGPRs: 0 
# |           391:  numKernargPreloadSGPRs: 0 
# |           392:  isWholeWaveFunction: false 
# |           393:  minNumAGPRs: 4294967295 
# |           394: body: | 
# |           395:  bb.1 (%ir-block.0): 
# | next:150'0                        {   search range start (exclusive)
# | next:150'1                            error: no match found in search range
# |           396:  liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6 
# |           397:   
# |           398:  %6:_(i32) = COPY $vgpr0 
# |           399:  %5:_(i16) = G_TRUNC %6(i32) 
# |           400:  %0:_(i8) = G_TRUNC %5(i16) 
# |           401:  %7:_(i32) = COPY $vgpr1 
# |           402:  %8:_(i32) = COPY $vgpr2 
# |           403:  %9:_(i32) = COPY $vgpr3 
# |           404:  %10:_(i32) = COPY $vgpr4 
# |           405:  %1:_(p8) = G_MERGE_VALUES %7(i32), %8(i32), %9(i32), %10(i32) 
# |           406:  %2:_(i32) = COPY $vgpr5 
# |           407:  %3:_(i32) = COPY $vgpr6 
# |           408:  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8) 
# | next:150'2                                                                 ?                                                                                                                   possible intended match
# |           409:  S_ENDPGM 0 
# |           410: ... 
# |           411: --- 
# |           412: name: raw_tbuffer_store_i8__vgpr_rsrc__sgpr_voffset__vgpr_soffset 
# | next:150'3                                                                      }  search range end (exclusive)
# |           413: alignment: 4 
# |           414: exposesReturnsTwice: false 
# |           415: legalized: true 
# |           416: regBankSelected: true 
# |           417: selected: true 
# |             .
# |             .
# |             .
# |           516:  scratchReservedForDynamicVGPRs: 0 
# |           517:  numKernargPreloadSGPRs: 0 
# |           518:  isWholeWaveFunction: false 
# |           519:  minNumAGPRs: 4294967295 
# |           520: body: | 
# |           521:  bb.1 (%ir-block.0): 
# | next:263'0                        {   search range start (exclusive)
# | next:263'1                            error: no match found in search range
# |           522:  liveins: $sgpr2, $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5 
# |           523:   
# |           524:  %6:_(i32) = COPY $vgpr0 
# |           525:  %5:_(i16) = G_TRUNC %6(i32) 
# |           526:  %0:_(i8) = G_TRUNC %5(i16) 
# |           527:  %7:_(i32) = COPY $vgpr1 
# |           528:  %8:_(i32) = COPY $vgpr2 
# |           529:  %9:_(i32) = COPY $vgpr3 
# |           530:  %10:_(i32) = COPY $vgpr4 
# |           531:  %1:_(p8) = G_MERGE_VALUES %7(i32), %8(i32), %9(i32), %10(i32) 
# |           532:  %2:_(i32) = COPY $sgpr2 
# |           533:  %3:_(i32) = COPY $vgpr5 
# |           534:  G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.ptr.tbuffer.store), %0(i8), %1(p8), %2(i32), %3(i32), 94, 0 :: (dereferenceable store (i8) into %ir.rsrc, addrspace 8) 
# | next:263'2                                                                 ?                                                                                                                   possible intended match
# |           535:  S_ENDPGM 0 
# |           536: ... 
# | next:263'3         } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.tbuffer.store.i8.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=instruction-select -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=UNPACKED C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=instruction-select -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll'
# .---command stderr------------
# | LLVM ERROR: unable to legalize instruction: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.raw.tbuffer.store), %0:_(i8), %1:_(<4 x i32>), %2:_(i32), %3:_(i32), 94, 0 :: (dereferenceable store (i8), addrspace 8) (in function: raw_tbuffer_store_i8__sgpr_rsrc__vgpr_voffset__sgpr_soffset)
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: c:\\_work\\llvm-project\\llvm-project\\build\\bin\\llc.exe -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -stop-after=instruction-select -o - C:\\_work\\llvm-project\\llvm-project\\llvm\\test\\CodeGen\\AMDGPU\\GlobalISel\\llvm.amdgcn.raw.tbuffer.store.i8.ll
# | 1.	Running pass 'CallGraph Pass Manager' on module 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll'.
# | 2.	Running pass 'Legalizer' on function '@raw_tbuffer_store_i8__sgpr_rsrc__vgpr_voffset__sgpr_soffset'
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=UNPACKED 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=UNPACKED C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\llvm.amdgcn.raw.tbuffer.store.i8.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-commits mailing list