[llvm] Revert "Redesign Straight-Line Strength Reduction (SLSR) (#162930)" (PR #169546)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 11:11:51 PST 2025


github-actions[bot] wrote:

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

* 166340 tests passed
* 2872 tests skipped
* 3 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/promote-constOffset-to-imm.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 -mcpu=gfx803 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX8 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx803
# 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=GFX8 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.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 -mtriple=amdgcn -mcpu=gfx900 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX9,GFX900 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -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-prefixes=GFX9,GFX900 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.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 -mtriple=amdgcn -mcpu=gfx1010 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX10 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -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-prefixes=GFX10 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.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 -mtriple=amdgcn -mcpu=gfx90a < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX9,GFX90A /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx90a
# 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=GFX9,GFX90A /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll:723:16: error: GFX90A-NEXT: is not on the line after the previous match
# | ; GFX90A-NEXT: s_movk_i32 s0, 0xd000
# |                ^
# | <stdin>:173:2: note: 'next' match was here
# |  s_movk_i32 s0, 0xd000
# |  ^
# | <stdin>:171:24: note: previous match ended here
# |  v_mov_b32_e32 v1, 0x7f
# |                        ^
# | <stdin>:172:1: note: non-matching line after previous match is here
# |  v_pk_mov_b32 v[4:5], 0, 0
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |         168:  v_addc_co_u32_e32 v3, vcc, 0, v2, vcc 
# |         169:  v_add_co_u32_e32 v2, vcc, 0x5000, v1 
# |         170:  v_addc_co_u32_e32 v3, vcc, 0, v3, vcc 
# |         171:  v_mov_b32_e32 v1, 0x7f 
# |         172:  v_pk_mov_b32 v[4:5], 0, 0 
# |         173:  s_movk_i32 s0, 0xd000 
# | next:723      !~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         174:  s_movk_i32 s1, 0xe000 
# |         175:  s_movk_i32 s2, 0xf000 
# |         176: .LBB1_1: ; %for.cond.preheader 
# |         177:  ; =>This Loop Header: Depth=1 
# |         178:  ; Child Loop BB1_2 Depth 2 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/splitkit-getsubrangeformask.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 -mcpu=gfx1010 -stop-after=greedy < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll | /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/splitkit-getsubrangeformask.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx1010 -stop-after=greedy
# 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/splitkit-getsubrangeformask.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll:149:16: error: CHECK-NEXT: expected string not found in input
# |  ; CHECK-NEXT: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[S_ADD_U32_18]], 168, 0 :: (invariant load (s32) from %ir.273, align 8, addrspace 4)
# |                ^
# | <stdin>:1485:95: note: scanning from here
# |  %427.sub1:sreg_64 = S_ADDC_U32 undef %57:sreg_32, %424, implicit-def dead $scc, implicit $scc
# |                                                                                               ^
# | <stdin>:1485:95: note: with "S_ADD_U32_18" equal to "%427"
# |  %427.sub1:sreg_64 = S_ADDC_U32 undef %57:sreg_32, %424, implicit-def dead $scc, implicit $scc
# |                                                                                               ^
# | <stdin>:1486:2: note: possible intended match here
# |  %428:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %427, 168, 0 :: (invariant load (s32) from %ir.275, align 8, addrspace 4)
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |          1480:  %414.sub1:sreg_64 = S_ADDC_U32 undef %36:sreg_32, %411, implicit-def dead $scc, implicit $scc 
# |          1481:  %423:sreg_32 = S_LSHL_B32 %3, 3, implicit-def dead $scc 
# |          1482:  %218:vgpr_32 = BUFFER_LOAD_FORMAT_X_IDXEN %82, %217, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s32), align 1, addrspace 8) 
# |          1483:  %424:sreg_32_xm0 = S_ASHR_I32 %423, 31, implicit-def dead $scc 
# |          1484:  undef %427.sub0:sreg_64 = S_ADD_U32 %56.sub0, %423, implicit-def $scc 
# |          1485:  %427.sub1:sreg_64 = S_ADDC_U32 undef %57:sreg_32, %424, implicit-def dead $scc, implicit $scc 
# | next:149'0                                                                                                   X error: no match found
# | next:149'1                                                                                                     with "S_ADD_U32_18" equal to "%427"
# |          1486:  %428:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM %427, 168, 0 :: (invariant load (s32) from %ir.275, align 8, addrspace 4) 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:149'2      ?                                                                                                                    possible intended match
# |          1487:  %248:sgpr_128 = S_LOAD_DWORDX4_IMM %223, 576, 0 :: (invariant load (s128) from %ir.159, addrspace 4) 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          1488:  %225:vgpr_32 = BUFFER_LOAD_FORMAT_X_IDXEN %82, %224, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s32), align 1, addrspace 8) 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          1489:  %231:vgpr_32 = BUFFER_LOAD_FORMAT_X_IDXEN %82, %230, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s32), align 1, addrspace 8) 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          1490:  %238:vgpr_32 = BUFFER_LOAD_FORMAT_X_IDXEN %82, %237, 0, 0, 0, 0, implicit $exec :: (dereferenceable load (s32), align 1, addrspace 8) 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          1491:  %71.sub3:sgpr_128 = S_MOV_B32 553734060 
# | next:149'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/waitcnt-vscnt.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 -mcpu=gfx802  -asm-verbose=0 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GCN,GFX8 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx802 -asm-verbose=0
# 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=GCN,GFX8 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.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 -mtriple=amdgcn -mcpu=gfx900  -asm-verbose=0 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GCN,GFX9 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=amdgcn -mcpu=gfx900 -asm-verbose=0
# 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=GCN,GFX9 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll:29:14: error: GFX9-NEXT: expected string not found in input
# | ; GFX9-NEXT: v_add_u32_e32 v2, 1, v0
# |              ^
# | <stdin>:18:29: note: scanning from here
# |  v_lshlrev_b32_e32 v1, 2, v0
# |                             ^
# | <stdin>:21:2: note: possible intended match here
# |  v_add_u32_e32 v1, 1, v0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           13:  .globl barrier_vmcnt_global 
# |           14:  .p2align 8 
# |           15:  .type barrier_vmcnt_global, at function 
# |           16: barrier_vmcnt_global: 
# |           17:  s_load_dwordx2 s[0:1], s[4:5], 0x24 
# |           18:  v_lshlrev_b32_e32 v1, 2, v0 
# | next:29'0                                 X error: no match found
# |           19:  s_waitcnt lgkmcnt(0) 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           20:  global_load_dword v2, v1, s[0:1] 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           21:  v_add_u32_e32 v1, 1, v0 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:29'1      ?                        possible intended match
# |           22:  v_mov_b32_e32 v0, 0 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~
# |           23:  v_lshrrev_b64 v[0:1], 30, v[0:1] 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           24:  v_mov_b32_e32 v3, s1 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           25:  v_add_co_u32_e32 v0, vcc, s0, v0 
# | next:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           26:  v_addc_co_u32_e32 v1, vcc, v3, v1, vcc 
# | next:29'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/169546


More information about the llvm-commits mailing list