2018-04-19 17:42:30 +02:00
|
|
|
# RUN: llc -o - %s -march=amdgcn -mcpu=fiji -run-pass=si-insert-waitcnts -verify-machineinstrs | FileCheck -check-prefix=GCN %s
|
|
|
|
|
|
|
|
# GCN-LABEL: waitcnt-back-edge-loop
|
|
|
|
# GCN: bb.2
|
2020-10-16 09:09:38 +02:00
|
|
|
# GCN: S_WAITCNT 3952
|
2020-05-27 19:25:37 +02:00
|
|
|
# GCN: $vgpr5 = V_CVT_I32_F32_e32 killed $vgpr5, implicit $mode, implicit $exec
|
2018-04-19 17:42:30 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
name: waitcnt-back-edge-loop
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
successors: %bb.1
|
|
|
|
|
|
|
|
$vgpr1 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr1_vgpr2
|
|
|
|
$vgpr2 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr1_vgpr2
|
2021-05-20 04:25:51 +02:00
|
|
|
$vgpr4 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load (s32) from `float addrspace(1)* null`, addrspace 1)
|
|
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load (s32) from `float addrspace(1)* null`, addrspace 1)
|
2018-04-19 17:42:30 +02:00
|
|
|
$sgpr0_sgpr1 = V_CMP_EQ_U32_e64 3, killed $sgpr4, implicit $exec
|
2019-03-18 20:25:39 +01:00
|
|
|
$vgpr3 = V_CNDMASK_B32_e64 0, -1082130432, 0, 1065353216, killed $sgpr0_sgpr1, implicit $exec
|
2018-04-19 17:42:30 +02:00
|
|
|
$vgpr5 = V_MOV_B32_e32 $vgpr0, implicit $exec, implicit $exec
|
|
|
|
S_BRANCH %bb.1
|
|
|
|
|
|
|
|
bb.3:
|
|
|
|
successors: %bb.1
|
|
|
|
|
2021-05-20 04:25:51 +02:00
|
|
|
$vgpr5 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load (s32) from `float addrspace(1)* null`, addrspace 1)
|
2018-04-19 17:42:30 +02:00
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.5, %bb.2
|
|
|
|
|
2020-05-27 19:25:37 +02:00
|
|
|
$vgpr5 = V_CVT_I32_F32_e32 killed $vgpr5, implicit $mode, implicit $exec
|
2018-04-19 17:42:30 +02:00
|
|
|
V_CMP_NE_U32_e32 0, $vgpr5, implicit-def $vcc, implicit $exec
|
|
|
|
$vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
|
|
|
|
S_CBRANCH_VCCZ %bb.5, implicit killed $vcc
|
|
|
|
|
|
|
|
bb.2:
|
|
|
|
successors: %bb.4, %bb.3
|
|
|
|
|
|
|
|
V_CMP_EQ_U32_e32 9, killed $vgpr5, implicit-def $vcc, implicit $exec
|
|
|
|
$vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
|
|
|
|
S_CBRANCH_VCCZ %bb.3, implicit killed $vcc
|
|
|
|
|
|
|
|
bb.4:
|
|
|
|
successors: %bb.3, %bb.1
|
|
|
|
|
2021-05-20 04:25:51 +02:00
|
|
|
$vgpr5 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load (s32) from `float addrspace(1)* null`, addrspace 1)
|
2020-05-27 19:25:37 +02:00
|
|
|
$vgpr4 = V_CVT_I32_F32_e32 $vgpr5, implicit $mode, implicit $exec
|
2018-04-19 17:42:30 +02:00
|
|
|
V_CMP_EQ_U32_e32 2, killed $vgpr4, implicit-def $vcc, implicit $exec
|
|
|
|
$vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
|
|
|
|
$vgpr4 = V_MOV_B32_e32 $vgpr5, implicit $exec, implicit $exec
|
|
|
|
S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
|
|
|
|
S_BRANCH %bb.3
|
|
|
|
|
|
|
|
bb.5:
|
|
|
|
|
2020-05-27 19:25:37 +02:00
|
|
|
$vgpr4 = V_MAC_F32_e32 killed $vgpr0, killed $vgpr3, killed $vgpr4, implicit $mode, implicit $exec
|
2018-04-19 17:42:30 +02:00
|
|
|
EXP_DONE 12, killed $vgpr4, undef $vgpr0, undef $vgpr0, undef $vgpr0, 0, 0, 15, implicit $exec
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 10:52:58 +01:00
|
|
|
S_ENDPGM 0
|
2018-04-19 17:42:30 +02:00
|
|
|
...
|
2018-05-30 17:47:45 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# GCN-LABEL: name: waitcnt-multiple-back-edges{{$}}
|
|
|
|
# GCN: bb.0:
|
|
|
|
# GCN: S_WAITCNT 0
|
|
|
|
# GCN-NEXT: S_BRANCH %bb.2
|
|
|
|
|
|
|
|
name: waitcnt-multiple-back-edges
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
S_BRANCH %bb.2
|
|
|
|
|
|
|
|
bb.1:
|
|
|
|
S_BRANCH %bb.2
|
|
|
|
|
|
|
|
bb.2:
|
|
|
|
S_CBRANCH_VCCZ %bb.1, implicit $vcc
|
|
|
|
|
|
|
|
bb.3:
|
|
|
|
S_CBRANCH_VCCNZ %bb.5, implicit $vcc
|
|
|
|
|
|
|
|
bb.4:
|
|
|
|
BUFFER_ATOMIC_ADD_OFFSET renamable $vgpr0, renamable $sgpr12_sgpr13_sgpr14_sgpr15, 0, 4, 0, implicit $exec
|
|
|
|
S_CBRANCH_SCC0 %bb.2, implicit $scc
|
|
|
|
S_BRANCH %bb.6
|
|
|
|
|
|
|
|
bb.5:
|
|
|
|
S_CBRANCH_SCC0 %bb.2, implicit $scc
|
|
|
|
S_BRANCH %bb.6
|
|
|
|
|
|
|
|
bb.6:
|
|
|
|
S_CBRANCH_SCC1 %bb.0, implicit $scc
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 10:52:58 +01:00
|
|
|
S_ENDPGM 0
|
2018-05-30 17:47:45 +02:00
|
|
|
...
|