[llvm] [StackSlotColoring] Check for zero stack slot size in RemoveDeadStores (PR #182673)

via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 21 06:28:04 PST 2026


github-actions[bot] wrote:

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

* 131150 tests passed
* 2949 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/si-lower-sgpr-spills-vgpr-lanes-usage.mir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -verify-machineinstrs -stress-regalloc=3 -start-before=greedy,0 -stop-after=si-lower-sgpr-spills -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=SGPR_SPILLED C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -verify-machineinstrs -stress-regalloc=3 -start-before=greedy,0 -stop-after=si-lower-sgpr-spills -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=SGPR_SPILLED 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir:45:23: error: SGPR_SPILLED-NEXT: is not on the line after the previous match
# |  ; SGPR_SPILLED-NEXT: $sgpr0 = SI_RESTORE_S32_FROM_VGPR [[DEF]], 1, implicit-def $sgpr0_sgpr1
# |                       ^
# | <stdin>:163:2: note: 'next' match was here
# |  $sgpr0 = SI_RESTORE_S32_FROM_VGPR %10, 1, implicit-def $sgpr0_sgpr1
# |  ^
# | <stdin>:161:43: note: previous match ended here
# |  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0
# |                                           ^
# | <stdin>:162:1: note: non-matching line after previous match is here
# |  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir:110:23: error: SGPR_SPILLED-NEXT: is not on the line after the previous match
# |  ; SGPR_SPILLED-NEXT: $sgpr2 = SI_RESTORE_S32_FROM_VGPR [[DEF]], 1, implicit-def $sgpr2_sgpr3
# |                       ^
# | <stdin>:317:2: note: 'next' match was here
# |  $sgpr2 = SI_RESTORE_S32_FROM_VGPR %10, 1, implicit-def $sgpr2_sgpr3
# |  ^
# | <stdin>:315:43: note: previous match ended here
# |  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0
# |                                           ^
# | <stdin>:316:1: note: non-matching line after previous match is here
# |  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir:172:23: error: SGPR_SPILLED-NEXT: is not on the line after the previous match
# |  ; SGPR_SPILLED-NEXT: $sgpr0 = SI_RESTORE_S32_FROM_VGPR [[DEF]], 1
# |                       ^
# | <stdin>:468:2: note: 'next' match was here
# |  $sgpr0 = SI_RESTORE_S32_FROM_VGPR %10, 1
# |  ^
# | <stdin>:466:43: note: previous match ended here
# |  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0
# |                                           ^
# | <stdin>:467:1: note: non-matching line after previous match is here
# |  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\si-lower-sgpr-spills-vgpr-lanes-usage.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |         158:  $sgpr4 = SI_RESTORE_S32_FROM_VGPR %10, 3, implicit-def $sgpr4_sgpr5 
# |         159:  $sgpr5 = SI_RESTORE_S32_FROM_VGPR %10, 4 
# |         160:  dead $sgpr30_sgpr31 = SI_CALL killed renamable $sgpr4_sgpr5, 0, csr_amdgpu, implicit undef $vgpr0 
# |         161:  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0 
# |         162:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10 
# |         163:  $sgpr0 = SI_RESTORE_S32_FROM_VGPR %10, 1, implicit-def $sgpr0_sgpr1 
# | next:45       !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         164:  $sgpr1 = SI_RESTORE_S32_FROM_VGPR %10, 2 
# |         165:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr2, 1, %10, implicit-def $sgpr2_sgpr3, implicit $sgpr2_sgpr3 
# |         166:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr3, 2, %10, implicit $sgpr2_sgpr3 
# |         167:  ADJCALLSTACKDOWN 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |         168:  ADJCALLSTACKUP 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |           .
# |           .
# |           .
# |         312:  $sgpr4 = SI_RESTORE_S32_FROM_VGPR %10, 3, implicit-def $sgpr4_sgpr5 
# |         313:  $sgpr5 = SI_RESTORE_S32_FROM_VGPR %10, 4 
# |         314:  dead $sgpr30_sgpr31 = SI_CALL killed renamable $sgpr4_sgpr5, 0, csr_amdgpu, implicit undef $vgpr0 
# |         315:  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0 
# |         316:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10 
# |         317:  $sgpr2 = SI_RESTORE_S32_FROM_VGPR %10, 1, implicit-def $sgpr2_sgpr3 
# | next:110      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         318:  $sgpr3 = SI_RESTORE_S32_FROM_VGPR %10, 2 
# |         319:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr2, 1, %10 
# |         320:  ADJCALLSTACKDOWN 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |         321:  ADJCALLSTACKUP 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |         322:  $vgpr0 = COPY %3 
# |           .
# |           .
# |           .
# |         463:  $sgpr4 = SI_RESTORE_S32_FROM_VGPR %10, 3, implicit-def $sgpr4_sgpr5 
# |         464:  $sgpr5 = SI_RESTORE_S32_FROM_VGPR %10, 4 
# |         465:  dead $sgpr30_sgpr31 = SI_CALL killed renamable $sgpr4_sgpr5, 0, csr_amdgpu, implicit undef $vgpr0 
# |         466:  $sgpr32 = SI_RESTORE_S32_FROM_VGPR %10, 0 
# |         467:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr32, 0, %10 
# |         468:  $sgpr0 = SI_RESTORE_S32_FROM_VGPR %10, 1 
# | next:172      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         469:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr2, 1, %10, implicit-def $sgpr2_sgpr3, implicit $sgpr2_sgpr3 
# |         470:  %10:vgpr_32 = SI_SPILL_S32_TO_VGPR $sgpr3, 2, %10, implicit $sgpr2_sgpr3 
# |         471:  ADJCALLSTACKDOWN 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |         472:  ADJCALLSTACKUP 0, 0, implicit-def $scc, implicit-def $sgpr32, implicit $sgpr32, implicit $sgpr32 
# |         473:  $vgpr0 = COPY %3 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# 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/182673


More information about the llvm-commits mailing list