[llvm] AMDGPU/GlobalISel: Fix regBankLegalize rules for uniform cvt_pkrtz (PR #203283)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 08:09:51 PDT 2026


github-actions[bot] wrote:

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

* 135647 tests passed
* 3420 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/scalar-float-sop2.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=amdgcn -mcpu=gfx1150 < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefixes=CHECK,GFX1150 C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn -mcpu=gfx1150
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefixes=CHECK,GFX1150 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=amdgcn -mcpu=gfx1150 -global-isel -new-reg-bank-select < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefixes=CHECK,GFX1150 C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn -mcpu=gfx1150 -global-isel -new-reg-bank-select
# .---command stderr------------
# | LLVM ERROR: No AMDGPU RegBankLegalize rules defined for opcode: %0:sgpr(s32) = G_AMDGPU_S_BUFFER_LOAD %1:sgpr(<4 x s32>), %2:sgpr(s32), 0 :: (dereferenceable invariant load (s32)) (in function: _amdgpu_ps_main)
# | 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 -mtriple=amdgcn -mcpu=gfx1150 -global-isel -new-reg-bank-select
# | 1.	Running pass 'CallGraph Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'AMDGPU Register Bank Legalize' on function '@_amdgpu_ps_main'
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefixes=CHECK,GFX1150 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll:157:16: error: CHECK-LABEL: expected string not found in input
# | ; CHECK-LABEL: fmac_f32:
# |                ^
# | <stdin>:564:23: note: scanning from here
# | s_cvt_pkrtz_v2f16_f32: ; @s_cvt_pkrtz_v2f16_f32
# |                       ^
# | <stdin>:616:9: note: possible intended match here
# |  .globl fmac_f32 ; -- Begin function fmac_f32
# |         ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\scalar-float-sop2.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            559:  .long 0 
# |            560:  .text 
# |            561:  .globl s_cvt_pkrtz_v2f16_f32 ; -- Begin function s_cvt_pkrtz_v2f16_f32 
# |            562:  .p2align 8 
# |            563:  .type s_cvt_pkrtz_v2f16_f32, at function 
# |            564: s_cvt_pkrtz_v2f16_f32: ; @s_cvt_pkrtz_v2f16_f32 
# | label:157'0                           X~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |            565: ; %bb.0: 
# | label:157'0     ~~~~~~~~~
# |            566:  s_cvt_pk_rtz_f16_f32 s0, s0, s1 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            567:  s_delay_alu instid0(SALU_CYCLE_3) 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            568:  v_mov_b32_e32 v0, s0 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            569:  ; return to shader part epilog 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            611:  .long 4 
# | label:157'0     ~~~~~~~~~
# |            612:  .long 0 
# | label:157'0     ~~~~~~~~~
# |            613:  .long 8 
# | label:157'0     ~~~~~~~~~
# |            614:  .long 0 
# | label:157'0     ~~~~~~~~~
# |            615:  .text 
# | label:157'0     ~~~~~~~
# |            616:  .globl fmac_f32 ; -- Begin function fmac_f32 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:157'1             ?                                      possible intended match
# |            617:  .p2align 8 
# | label:157'0     ~~~~~~~~~~~~
# |            618:  .type fmac_f32, at function 
# | label:157'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            619: fmac
# | label:157'0     ~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</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/203283


More information about the llvm-commits mailing list