[llvm] [RegAlloc] Account for use availability when applying rematerializable weight discount (PR #159180)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 07:59:20 PDT 2025
================
@@ -91,15 +91,17 @@ body: |
bb.0:
; GCN-LABEL: name: test_no_remat_s_mov_b32_vreg_src_short_lr
; GCN: renamable $sgpr0 = IMPLICIT_DEF
- ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 renamable $sgpr0
- ; GCN-NEXT: SI_SPILL_S32_SAVE killed renamable $sgpr1, %stack.1, implicit $exec, implicit $sgpr32 :: (store (s32) into %stack.1, addrspace 5)
- ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 renamable $sgpr0
- ; GCN-NEXT: SI_SPILL_S32_SAVE killed renamable $sgpr1, %stack.0, implicit $exec, implicit $sgpr32 :: (store (s32) into %stack.0, addrspace 5)
+ ; GCN-NEXT: renamable $sgpr1 = S_MOV_B32 killed renamable $sgpr0
+ ; GCN-NEXT: renamable $sgpr0 = IMPLICIT_DEF
; GCN-NEXT: renamable $sgpr0 = S_MOV_B32 killed renamable $sgpr0
- ; GCN-NEXT: renamable $sgpr1 = SI_SPILL_S32_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s32) from %stack.1, addrspace 5)
- ; GCN-NEXT: S_NOP 0, implicit killed renamable $sgpr1
- ; GCN-NEXT: renamable $sgpr1 = SI_SPILL_S32_RESTORE %stack.0, implicit $exec, implicit $sgpr32 :: (load (s32) from %stack.0, addrspace 5)
+ ; GCN-NEXT: SI_SPILL_S32_SAVE killed renamable $sgpr0, %stack.1, implicit $exec, implicit $sgpr32 :: (store (s32) into %stack.1, addrspace 5)
+ ; GCN-NEXT: renamable $sgpr0 = IMPLICIT_DEF
----------------
arsenm wrote:
I suppose this grew by one IMPLICIT_DEF
https://github.com/llvm/llvm-project/pull/159180
More information about the llvm-commits
mailing list