[llvm] [AMDGPU] Enable sinking of free vector ops that will be folded into their uses (PR #162580)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 07:32:21 PST 2025


github-actions[bot] wrote:

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

* 166381 tests passed
* 2869 tests skipped
* 2 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/frem.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mattr=+mad-mac-f32-insts  < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=SI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mattr=+mad-mac-f32-insts
# 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=SI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.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 -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=bonaire < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=bonaire
# 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=CI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=tonga < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=VI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=tonga
# 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=VI /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 5
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx900 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=GFX9 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx900
# 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=GFX9 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1010 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=GFX10 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -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=GFX10 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 7
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX11,GFX11-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX11,GFX11-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 8
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX11,GFX11-FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX11,GFX11-FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 9
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1150 -mattr=+real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1150,GFX1150-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1150 -mattr=+real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1150,GFX1150-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 10
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1150 -mattr=-real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1150,GFX1150-FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1150 -mattr=-real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1150,GFX1150-FAKE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# note: command had no output on stdout or stderr
# RUN: at line 11
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1200 -mattr=+real-true16 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1200,GFX1200-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -amdgpu-scalarize-global-loads=false -enable-misched=0 -mtriple=amdgcn -mcpu=gfx1200 -mattr=+real-true16
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GFX1200,GFX1200-TRUE16 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll:12987:17: error: GFX1200-NEXT: expected string not found in input
# | ; GFX1200-NEXT: s_wait_alu 0xfffd
# |                 ^
# | <stdin>:1942:26: note: scanning from here
# |  v_add_f32_e32 v9, v7, v6
# |                          ^
# | <stdin>:1943:2: note: possible intended match here
# |  s_wait_alu depctr_va_vcc(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll:15626:17: error: GFX1200-NEXT: expected string not found in input
# | ; GFX1200-NEXT: s_wait_alu 0xfffd
# |                 ^
# | <stdin>:2219:26: note: scanning from here
# |  v_add_f32_e32 v5, v3, v1
# |                          ^
# | <stdin>:2220:2: note: possible intended match here
# |  s_wait_alu depctr_va_vcc(0)
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll:17724:17: error: GFX1200-NEXT: expected string not found in input
# | ; GFX1200-NEXT: s_wait_alu 0xfffe
# |                 ^
# | <stdin>:2902:33: note: scanning from here
# |  s_cselect_b32 s3, 0x7ff80000, 0
# |                                 ^
# | <stdin>:2903:2: note: possible intended match here
# |  s_wait_alu depctr_sa_sdst(0)
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/frem.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |            1937:  s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1) 
# |            1938:  v_xor_b32_e32 v7, 0x80000000, v7 
# |            1939:  v_fma_f32 v7, v7, v6, v10 
# |            1940:  s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1) 
# |            1941:  v_cmp_gt_f32_e32 vcc_lo, 0, v7 
# |            1942:  v_add_f32_e32 v9, v7, v6 
# | next:12987'0                              X error: no match found
# |            1943:  s_wait_alu depctr_va_vcc(0) 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:12987'1      ?                            possible intended match
# |            1944:  v_cndmask_b32_e32 v7, v7, v9, vcc_lo 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1945:  s_delay_alu instid0(VALU_DEP_1) 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1946:  v_ldexp_f32 v7, v7, 12 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            1947:  s_cbranch_scc1 .LBB11_5 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1948: ; %bb.6: ; %Flow51 
# | next:12987'0     ~~~~~~~~~~~~~~~~~~~
# |               .
# |               .
# |               .
# |            2214:  s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1) 
# |            2215:  v_xor_b32_e32 v3, 0x80000000, v3 
# |            2216:  v_fma_f32 v3, v3, v1, v6 
# |            2217:  s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1) 
# |            2218:  v_cmp_gt_f32_e32 vcc_lo, 0, v3 
# |            2219:  v_add_f32_e32 v5, v3, v1 
# | next:15626'0                              X error: no match found
# |            2220:  s_wait_alu depctr_va_vcc(0) 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:15626'1      ?                            possible intended match
# |            2221:  v_cndmask_b32_e32 v3, v3, v5, vcc_lo 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            2222:  s_delay_alu instid0(VALU_DEP_1) 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            2223:  v_ldexp_f32 v3, v3, 12 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            2224:  s_cbranch_scc1 .LBB12_5 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            2225: ; %bb.6: ; %Flow125 
# | next:15626'0     ~~~~~~~~~~~~~~~~~~~~
# |               .
# |               .
# |               .
# |            2897:  v_cmp_nlg_f64_e32 vcc_lo, 0, v[2:3] 
# |            2898:  s_cselect_b32 s2, 0x7ff80000, 0 
# |            2899:  s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(VALU_DEP_1) 
# |            2900:  v_mov_b32_e32 v1, s2 
# |            2901:  s_and_b32 s3, vcc_lo, exec_lo 
# |            2902:  s_cselect_b32 s3, 0x7ff80000, 0 
# | next:17724'0                                     X error: no match found
# |            2903:  s_wait_alu depctr_sa_sdst(0) 
# | next:17724'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:17724'1      ?                             possible intended match
# |            2904:  v_dual_mov_b32 v0, 0 :: v_dual_mov_b32 v3, s3 
# | next:17724'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            2905:  v_mov_b32_e32 v2, v0 
# | next:17724'0     ~~~~~~~~~~~~~~~~~~~~~~
# |            2906:  global_store_b128 v0, v[0:3], s[0:1] 
# | next:17724'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            2907:  s_endpgm 
# | next:17724'0     ~~~~~~~~~~
# |            2908: .Lfunc_end14: 
# | next:17724'0     ~~~~~~~~~~~~~~
# |               .
# |               .
# |               .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/undef-handling-crash-in-ra.ll</summary>

```
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 -mcpu=gfx90a /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll:50:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: v_mov_b32_e32 v62, s66
# |               ^
# | <stdin>:49:23: note: scanning from here
# |  v_mov_b32_e32 v40, v0
# |                       ^
# | <stdin>:50:2: note: possible intended match here
# |  v_mov_b32_e32 v60, s66
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/undef-handling-crash-in-ra.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           44:  v_mov_b32_e32 v31, v0 
# |           45:  s_mov_b32 s32, 0 
# |           46:  s_mov_b32 s33, s16 
# |           47:  s_mov_b32 s52, s15 
# |           48:  s_mov_b64 s[36:37], s[10:11] 
# |           49:  v_mov_b32_e32 v40, v0 
# | next:50'0                           X error: no match found
# |           50:  v_mov_b32_e32 v60, s66 
# | next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:50'1      ?                       possible intended match
# |           51:  v_mov_b32_e32 v61, s67 
# | next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |           52:  flat_store_dwordx2 v[56:57], v[62:63] 
# | next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           53:  s_waitcnt lgkmcnt(0) 
# | next:50'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           54:  s_swappc_b64 s[30:31], s[54:55] 
# | next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           55:  flat_load_dwordx2 a[32:33], v[56:57] 
# | next:50'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/162580


More information about the llvm-commits mailing list