[llvm] [AMDGPU] Reset minOccupancy if unclustered schedule was not run for any region. (PR #162025)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 14:01:34 PDT 2025


================
@@ -0,0 +1,735 @@
+# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -start-before=machine-scheduler -stop-after=greedy,2 -amdgpu-use-amdgpu-trackers=1 -verify-machineinstrs -debug-only=machine-scheduler %s -o - 2>&1 | FileCheck %s
+
+--- |
+  define amdgpu_kernel void @no_sched_metric_due_to_spills() #0 {
+    ret void
+  }
+
+  attributes #0 = { "amdgpu-flat-work-group-size"="1,256" }
+...
+
+# When using the GCN Trackers, the scheduler is able to acieve desired occupancy without running high-RP-reschedule stage. However, the RP is still high,
+# and RA is unable to allocate without spills. By running the high-RP-reschedule schedule we would have furhter decreased RP, which provides increased
+# flexibility for RA.
+
+# If Unclustered High RP Reschedule gets run, the following CHECK will have to be removed.
+# CHECK: Unclustered High Register Pressure Reschedule: No regions scheduled, min occupancy stays at 4, MFI occupancy stays at 4.
+
+---
+name:            no_sched_metric_due_to_spills
+tracksRegLiveness: true
+machineFunctionInfo:
+  stackPtrOffsetReg: '$sgpr32'
+  occupancy:       4
+body:             |
+  bb.0:
+    liveins: $vgpr0, $sgpr0_sgpr1, $sgpr15
+
+    %0:sgpr_32 = COPY $sgpr15
+    %1:sgpr_64(p4) = COPY $sgpr0_sgpr1
+    %2:vgpr_32(s32) = COPY $vgpr0
----------------
arsenm wrote:

```suggestion
    %1:sgpr_64 = COPY $sgpr0_sgpr1
    %2:vgpr_32 = COPY $vgpr0
```

Drop all the LLT references 

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


More information about the llvm-commits mailing list