llvm-project/llvm/test/CodeGen/AMDGPU/sema-v-unsched-bundle.ll
Lucas Ramirez 7274ae970d
[AMDGPU][Scheduler] Simplify scheduling revert logic (#177203)
When scheduling must be reverted for a region, the current
implementation re-orders non-debug instructions and debug instructions
separately; the former in a first pass and the latter in a second pass
handled by a generic machine scheduler helper whose state is tied to the
current region being scheduled, in turns limiting the revert logic to
only work on the active scheduling region.

This makes the revert logic work in a single pass for all MIs, and
removes the restriction that it works exclusively on the active
scheduling region. The latter enables future use cases such as reverting
scheduling of multiple regions at once.
2026-02-01 17:55:12 +01:00

19 lines
619 B
LLVM

; REQUIRES: asserts
; RUN: llc -mtriple=amdgcn -O1 -mcpu=gfx90a -debug-only=machine-scheduler -filetype=null < %s 2>&1 | FileCheck --check-prefix=DEBUG %s
; DEBUG: Reverting scheduling for region 0
@G = global <32 x i8> splat (i8 1)
@G.1 = global <32 x i8> splat (i8 127)
define amdgpu_kernel void @gws_sema_v_offset0(i32 %val, <32 x i1>* %inp) {
%LGV1 = load <32 x i8>, ptr @G.1, align 32
%LGV = load <32 x i8>, ptr @G, align 32
call void @llvm.amdgcn.ds.gws.sema.v(i32 0)
%C = icmp ne <32 x i8> %LGV, %LGV1
store <32 x i1> %C, ptr %inp, align 4
ret void
}
declare void @llvm.amdgcn.ds.gws.sema.v(i32)