[llvm] IPRA Fix missing save/restore of used CSR (PR #200371)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 04:16:14 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 135232 tests passed
* 3335 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/amdgpu-spill-cfi-saved-regs.ll</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=gfx900 -amdgpu-spill-cfi-saved-regs -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefixes=CHECK,WAVE64 C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -amdgpu-spill-cfi-saved-regs -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll'
# .---command stderr------------
# | warning: inline asm clobber list contains reserved registers: s64, s65, s66, s67, s68, s69, s70, s71, s80, s81, s82, s83, s84, s85, s86, s87, s96, s97
# | note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
# | warning: inline asm clobber list contains reserved registers: v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v90, v91, v92, v93, v94, v95, v96, v97, v98, v99, v100, v101, v102, v103, v104, v105, v106, v107, v108, v109, v110, v111, v112, v113, v114, v115, v116, v117, v118, v119, v120, v121, v122, v123, v124, v125, v126, v127, v128, v129
# | note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
# | warning: inline asm clobber list contains reserved registers: v64, v65, v66, v67, v68, v69, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v80, v81, v82, v83, v84, v85, v86, v87, v88, v89, v90, v91, v92, v93, v94, v95, v96, v97, v98, v99, v100, v101, v102, v103, v104, v105, v106, v107, v108, v109, v110, v111, v112, v113, v114, v115, v116, v117, v118, v119, v120, v121, v122, v123, v124, v125, v126, v127, v128, v129, v130, v131, v132, v133, v134, v135, v136, v137, v138, v139, v140, v141, v142, v143, v144, v145, v146, v147, v148, v149, v150, v151, v152, v153, v154, v155, v156, v157, v158, v159, v160, v161, v162, v163, v164, v165, v166, v167, v168, v169, v170, v171, v172, v173, v174, v175, v176, v177, v178, v179, v180, v181, v182, v183, v184, v185, v186, v187, v188, v189, v190, v191, v192, v193, v194, v195, v196, v197, v198, v199, v200, v201, v202, v203, v204, v205, v206, v207, v208, v209, v210, v211, v212, v213, v214, v215, v216, v217, v218, v219, v220, v221, v222, v223, v224, v225, v226, v227, v228, v229, v230, v231, v232, v233, v234, v235, v236, v237, v238, v239, v240, v241, v242, v243, v244, v245, v246, v247, v248, v249, v250, v251, v252, v253, v254, v255
# | note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefixes=CHECK,WAVE64 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll:1657:16: error: WAVE64-NEXT: is not on the line after the previous match
# | ; WAVE64-NEXT: ;;#ASMSTART
# | ^
# | <stdin>:1529:2: note: 'next' match was here
# | ;;#ASMSTART
# | ^
# | <stdin>:1304:44: note: previous match ended here
# | .cfi_llvm_register_pair 17, 36, 32, 37, 32
# | ^
# | <stdin>:1305:1: note: non-matching line after previous match is here
# | buffer_store_dword v40, off, s[0:3], s32 offset:444 ; 4-byte Folded Spill
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll:2008:16: error: WAVE64-NEXT: is not on the line after the previous match
# | ; WAVE64-NEXT: s_mov_b64 s[18:19], exec
# | ^
# | <stdin>:1833:2: note: 'next' match was here
# | s_mov_b64 s[18:19], exec
# | ^
# | <stdin>:1828:20: note: previous match ended here
# | s_mov_b32 s33, s32
# | ^
# | <stdin>:1829:1: note: non-matching line after previous match is here
# | s_or_saveexec_b64 s[16:17], -1
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\amdgpu-spill-cfi-saved-regs.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 1524: .cfi_llvm_vector_offset 2813, 32, 17, 64, 512
# | 1525: buffer_store_dword v254, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
# | 1526: .cfi_llvm_vector_offset 2814, 32, 17, 64, 256
# | 1527: buffer_store_dword v255, off, s[0:3], s32 ; 4-byte Folded Spill
# | 1528: .cfi_llvm_vector_offset 2815, 32, 17, 64, 0
# | 1529: ;;#ASMSTART
# | next:1657 !~~~~~~~~~~ error: match on wrong line
# | 1530: ; clobber all VGPRs
# | 1531: ;;#ASMEND
# | 1532: buffer_load_dword v255, off, s[0:3], s32 ; 4-byte Folded Reload
# | 1533: buffer_load_dword v254, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
# | 1534: buffer_load_dword v253, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
# | .
# | .
# | .
# | 1828: s_mov_b32 s33, s32
# | 1829: s_or_saveexec_b64 s[16:17], -1
# | 1830: buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill
# | 1831: .cfi_offset 2600, 0
# | 1832: s_mov_b64 exec, s[16:17]
# | 1833: s_mov_b64 s[18:19], exec
# | next:2008 !~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 1834: .cfi_llvm_register_pair 17, 50, 32, 51, 32
# | 1835: .cfi_def_cfa_register 65
# | 1836: v_writelane_b32 v40, s30, 0
# | 1837: s_addk_i32 s32, 0x400
# | 1838: v_writelane_b32 v40, s31, 1
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/sgpr-spills-split-regalloc.ll</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=gfx803 -O0 < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -enable-var-scope -check-prefix=GCN C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple amdgcn-amd-amdhsa -mcpu=gfx803 -O0
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -enable-var-scope -check-prefix=GCN 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll:1486:13: error: GCN-NEXT: is not on the line after the previous match
# | ; GCN-NEXT: ;;#ASMSTART
# | ^
# | <stdin>:1552:2: note: 'next' match was here
# | ;;#ASMSTART
# | ^
# | <stdin>:1439:41: note: previous match ended here
# | s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# | ^
# | <stdin>:1440:1: note: non-matching line after previous match is here
# | buffer_store_dword v40, off, s[0:3], s32 offset:444 ; 4-byte Folded Spill
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll:1525:13: error: GCN-NEXT: expected string not found in input
# | ; GCN-NEXT: s_add_i32 s32, s32, 0x7400
# | ^
# | <stdin>:1696:20: note: scanning from here
# | s_mov_b32 s33, s32
# | ^
# | <stdin>:1700:2: note: possible intended match here
# | s_add_i32 s32, s32, 0x400
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\sgpr-spills-split-regalloc.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 1547: buffer_store_dword v251, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
# | 1548: buffer_store_dword v252, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
# | 1549: buffer_store_dword v253, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
# | 1550: buffer_store_dword v254, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
# | 1551: buffer_store_dword v255, off, s[0:3], s32 ; 4-byte Folded Spill
# | 1552: ;;#ASMSTART
# | next:1486 !~~~~~~~~~~ error: match on wrong line
# | 1553: ;;#ASMEND
# | 1554: buffer_load_dword v255, off, s[0:3], s32 ; 4-byte Folded Reload
# | 1555: buffer_load_dword v254, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
# | 1556: buffer_load_dword v253, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
# | 1557: buffer_load_dword v252, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
# | .
# | .
# | .
# | 1691: .type spill_sgpr_no_free_vgpr_ipra, at function
# | 1692: spill_sgpr_no_free_vgpr_ipra: ; @spill_sgpr_no_free_vgpr_ipra
# | 1693: ; %bb.0:
# | 1694: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# | 1695: s_mov_b32 s18, s33
# | 1696: s_mov_b32 s33, s32
# | next:1525'0 X error: no match found
# | 1697: s_or_saveexec_b64 s[16:17], -1
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1698: buffer_store_dword v40, off, s[0:3], s33 ; 4-byte Folded Spill
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1699: s_mov_b64 exec, s[16:17]
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1700: s_add_i32 s32, s32, 0x400
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1525'1 ? possible intended match
# | 1701: v_writelane_b32 v40, s30, 0
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1702: v_writelane_b32 v40, s31, 1
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1703: s_getpc_b64 s[16:17]
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~
# | 1704: s_add_u32 s16, s16, child_function_ipra at rel32@lo+4
# | next:1525'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1705: s_addc_u32 s17, s17, child_function_ipra at rel32@hi+12
# | next:1525'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/200371
More information about the llvm-commits
mailing list