[llvm] [AMDGPU][True16][CodeGen] update wwm reg sorting check condition (PR #135053)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 20 23:21:55 PDT 2025


================
@@ -0,0 +1,30 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 -run-pass=prologepilog %s -o - | FileCheck -check-prefix=GCN %s
+
+---
+name:            wwm_skip_shift_16bit_reg
+tracksRegLiveness: true
+noVRegs:           true
+machineFunctionInfo:
+  wwmReservedRegs: ['$vgpr0_lo16']
+  isEntryFunction: false
+body:             |
+  bb.0:
+    liveins: $sgpr0, $sgpr1
+    ; GCN-LABEL: name: wwm_skip_shift_16bit_reg
+    ; GCN: liveins: $sgpr0, $sgpr1
+    ; GCN-NEXT: {{  $}}
+    ; GCN-NEXT: $sgpr2 = S_XOR_SAVEEXEC_B32 -1, implicit-def $exec, implicit-def dead $scc, implicit $exec
+    ; GCN-NEXT: SCRATCH_STORE_DWORD_SADDR killed $vgpr1, $sp_reg, 0, 0, implicit $exec, implicit $flat_scr :: (store (s32) into %stack.0, addrspace 5)
----------------
cdevadas wrote:

wwm spill and restore for vgpr0_lo16 is missing at the prolog and epilog. There is wwm spill for vgpr1 instead.

https://github.com/llvm/llvm-project/pull/135053


More information about the llvm-commits mailing list