[llvm] Fix assert in SlotIndexes::getInstructionIndex in debug builds (PR #189370)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 04:32:37 PDT 2026


github-actions[bot] wrote:

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

* 134676 tests passed
* 3269 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/wqm-debug-instr-terminator.mir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=amdgcn -mcpu=gfx1010 -run-pass si-wqm -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn -mcpu=gfx1010 -run-pass si-wqm -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir:64:16: error: CHECK-NEXT: is not on the line after the previous match
# |  ; CHECK-NEXT: [[S_AND_SAVEEXEC_B32_:%[0-9]+]]:sreg_32 = S_AND_SAVEEXEC_B32 [[COPY]], implicit-def $exec, implicit-def $scc, implicit $exec
# |                ^
# | <stdin>:154:2: note: 'next' match was here
# |  %10:sreg_32 = S_AND_SAVEEXEC_B32 %8, implicit-def $exec, implicit-def $scc, implicit $exec
# |  ^
# | <stdin>:151:31: note: previous match ended here
# |  $exec_lo = EXIT_STRICT_WQM %9
# |                               ^
# | <stdin>:152:1: note: non-matching line after previous match is here
# |  DBG_VALUE $noreg, $noreg
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\wqm-debug-instr-terminator.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |        149:  %9:sreg_32 = ENTER_STRICT_WQM -1, implicit-def $exec, implicit-def $scc, implicit $exec 
# |        150:  %5:vgpr_32 = DS_PARAM_LOAD 0, 0, 0, 1, implicit $m0, implicit $exec 
# |        151:  $exec_lo = EXIT_STRICT_WQM %9 
# |        152:  DBG_VALUE $noreg, $noreg 
# |        153:  DBG_VALUE $noreg, $noreg 
# |        154:  %10:sreg_32 = S_AND_SAVEEXEC_B32 %8, implicit-def $exec, implicit-def $scc, implicit $exec 
# | next:64      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |        155:  BUFFER_STORE_DWORD_OFFSET_exact %5, %3, %4, 0, 0, 0, implicit $exec 
# |        156:  $exec_lo = COPY %10 
# |        157:  undef %6.sub0:vreg_64 = COPY %5 
# |        158:  %6.sub1:vreg_64 = COPY %1 
# |        159:  $exec_lo = S_AND_B32 $exec_lo, %8, implicit-def $scc 
# |          .
# |          .
# |          .
# | >>>>>>
# `-----------------------------
# 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/189370


More information about the llvm-commits mailing list