[llvm] [AMDGPU] Use new CSR cost calculation (PR #219220)
Lukas Sommer via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 01:59:42 PDT 2026
================
@@ -6,66 +6,117 @@
; by introducing a copy to AGPR register. The VGPR store to AGPR (v_accvgpr_write_b32) and later the
; restore from AGPR (v_accvgpr_read_b32) should be whole-wave operations and hence exec mask should be
; manipulated to ensure all lanes are active when these instructions are executed.
+; The profiled loop makes stack spills sufficiently expensive to select this split
+; with the default CSR cost model.
define void @vector_reg_liverange_split() #0 {
----------------
sommerlukas wrote:
Yes, for this test to still serve its purpose I had to change the test input. With the new normalized cost model, an unprofiled single call is too cold to trigger this split. That is intended: the allocator should choose the split only when the repeated spill cost outweighs the first CSR use. I've clarified the test comment.
https://github.com/llvm/llvm-project/pull/219220
More information about the llvm-commits
mailing list