[llvm] [AMDGPU] Add regbankselect rules for G_ICMP/G_FCMP (PR #172048)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 09:45:37 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 167101 tests passed
* 2942 tests skipped
* 3 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll (Likely Already Failing)</summary>
This test is already failing at the base commit.

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn-amd-amdhsa -global-isel -new-reg-bank-select -mcpu=gfx1200 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=GFX12 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn-amd-amdhsa -global-isel -new-reg-bank-select -mcpu=gfx1200
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=GFX12 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll:160:15: error: GFX12-NEXT: expected string not found in input
# | ; GFX12-NEXT: s_wait_alu 0xf1ff
# |               ^
# | <stdin>:757:28: note: scanning from here
# |  v_readfirstlane_b32 s7, v3
# |                            ^
# | <stdin>:758:2: note: possible intended match here
# |  s_wait_alu depctr_va_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll:192:15: error: GFX12-NEXT: expected string not found in input
# | ; GFX12-NEXT: s_wait_alu 0xf1ff
# |               ^
# | <stdin>:864:23: note: scanning from here
# |  s_mov_b32 s7, exec_lo
# |                       ^
# | <stdin>:865:2: note: possible intended match here
# |  s_wait_alu depctr_va_sdst(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll:223:15: error: GFX12-NEXT: expected string not found in input
# | ; GFX12-NEXT: s_wait_alu 0xf1ff
# |               ^
# | <stdin>:970:28: note: scanning from here
# |  v_readfirstlane_b32 s9, v5
# |                            ^
# | <stdin>:971:2: note: possible intended match here
# |  s_wait_alu depctr_va_sdst(0)
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           752: .LBB8_1: ; =>This Inner Loop Header: Depth=1 
# |           753:  v_readfirstlane_b32 s4, v0 
# |           754:  s_wait_loadcnt 0x0 
# |           755:  v_readfirstlane_b32 s5, v1 
# |           756:  v_readfirstlane_b32 s6, v2 
# |           757:  v_readfirstlane_b32 s7, v3 
# | next:160'0                                X error: no match found
# |           758:  s_wait_alu depctr_va_sdst(0) 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:160'1      ?                             possible intended match
# |           759:  s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2) 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           760:  v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[0:1] 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           761:  v_cmp_eq_u64_e64 s1, s[6:7], v[2:3] 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           762:  s_and_b32 s1, vcc_lo, s1 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           763:  s_delay_alu instid0(SALU_CYCLE_1) 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           859: test_buffer_load_i8_waterfall_soffset: ; @test_buffer_load_i8_waterfall_soffset 
# | next:160'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           860: ; %bb.0: 
# |           861:  s_mov_b32 s6, exec_lo 
# |           862: .LBB9_1: ; =>This Inner Loop Header: Depth=1 
# |           863:  v_readfirstlane_b32 s8, v1 
# |           864:  s_mov_b32 s7, exec_lo 
# | next:192'0                           X error: no match found
# |           865:  s_wait_alu depctr_va_sdst(0) 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:192'1      ?                             possible intended match
# |           866:  v_cmpx_eq_u32_e64 s8, v1 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           867:  s_wait_loadcnt 0x0 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~
# |           868:  buffer_load_i8 v2, v0, s[0:3], s8 offen 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           869:  ; implicit-def: $vgpr1 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |           870:  ; implicit-def: $vgpr0 
# | next:192'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           965:  v_readfirstlane_b32 s4, v0 
# |           966:  s_wait_loadcnt 0x0 
# |           967:  v_readfirstlane_b32 s5, v1 
# |           968:  v_readfirstlane_b32 s6, v2 
# |           969:  v_readfirstlane_b32 s7, v3 
# |           970:  v_readfirstlane_b32 s9, v5 
# | next:223'0                                X error: no match found
# |           971:  s_wait_alu depctr_va_sdst(0) 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:223'1      ?                             possible intended match
# |           972:  v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[0:1] 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           973:  s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3) 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           974:  v_cmp_eq_u64_e64 s2, s[6:7], v[2:3] 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           975:  v_cmp_eq_u32_e64 s3, s9, v5 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           976:  s_and_b32 s2, vcc_lo, s2 
# | next:223'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx700 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX7 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx700
# .---command stderr------------
# | LLVM ERROR: instruction is not legal: %40:sgpr(s32) = G_FCMP floatpred(oeq), %38:sgpr(s32), %28:sgpr (in function: fcmp_uniform_select)
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX7 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX7 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefix=OLD_RBS /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefix=OLD_RBS /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -new-reg-bank-select < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefix=NEW_RBS /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -new-reg-bank-select
# .---command stderr------------
# | LLVM ERROR: instruction is not legal: %10:sgpr(s32) = G_FCMP floatpred(oeq), %0:sgpr(s32), %7:sgpr (in function: vcc_to_scc)
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefix=NEW_RBS /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll:167:18: error: NEW_RBS-LABEL: expected string not found in input
# | ; NEW_RBS-LABEL: uniform_i1_phi:
# |                  ^
# | <stdin>:246:14: note: scanning from here
# | abs_sgpr_i16: ; @abs_sgpr_i16
# |              ^
# | <stdin>:246:20: note: possible intended match here
# | abs_sgpr_i16: ; @abs_sgpr_i16
# |                    ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            241: ; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0 
# |            242:  .text 
# |            243:  .globl abs_sgpr_i16 ; -- Begin function abs_sgpr_i16 
# |            244:  .p2align 8 
# |            245:  .type abs_sgpr_i16, at function 
# |            246: abs_sgpr_i16: ; @abs_sgpr_i16 
# | label:167'0                  X~~~~~~~~~~~~~~~~ error: no match found
# | label:167'1                        ?           possible intended match
# |            247: ; %bb.0: 
# | label:167'0     ~~~~~~~~~
# |            248:  s_sext_i32_i16 s0, s0 
# | label:167'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            249:  s_abs_i32 s0, s0 
# | label:167'0     ~~~~~~~~~~~~~~~~~~
# |            250:  v_mov_b32_e32 v2, s0 
# | label:167'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            251:  global_store_short v[0:1], v2, off 
# | label:167'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/172048


More information about the llvm-commits mailing list