1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
Carl Ritson d40c701079 [AMDGPU] Unify early PS termination blocks
Generate a single early exit block out-of-line and branch to this
if all lanes are killed. This avoids branching if lanes are active.

Reviewed By: nhaehnle

Differential Revision: https://reviews.llvm.org/D82641
2020-07-03 09:58:05 +09:00

41 lines
895 B
YAML

# RUN: llc -march=amdgcn -mcpu=polaris10 -run-pass si-insert-skips -amdgpu-skip-threshold-legacy=1 %s -o - | FileCheck %s
# https://bugs.freedesktop.org/show_bug.cgi?id=99019
--- |
define amdgpu_ps void @kill_uncond_branch() {
ret void
}
...
---
# CHECK-LABEL: name: kill_uncond_branch
# CHECK: bb.0:
# CHECK: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
# CHECK: bb.1:
# CHECK: V_CMPX_LE_F32_e32
# CHECK-NEXT: S_CBRANCH_EXECZ %bb.3, implicit $exec
# CHECK: bb.2:
# CHECK: S_ENDPGM 0
# CHECK: bb.3:
# CHECK-NEXT: EXP_DONE
# CHECK: S_ENDPGM 0
name: kill_uncond_branch
body: |
bb.0:
successors: %bb.1
S_CBRANCH_VCCNZ %bb.1, implicit $vcc
bb.1:
successors: %bb.2
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
S_BRANCH %bb.2
bb.2:
S_ENDPGM 0