1 # RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN -check-prefix=VI %s
2 # RUN: llc -march=amdgcn -mcpu=gfx803 -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN -check-prefix=GFX8 %s
3 # RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass post-RA-hazard-rec %s -o - | FileCheck -check-prefix=GCN -check-prefix=GFX9 %s
5 # GCN-LABEL: name: hazard_implicit_def
10 # GCN: V_INTERP_P1_F32
13 name: hazard_implicit_def
15 exposesReturnsTwice: false
17 regBankSelected: false
19 tracksRegLiveness: true
22 - { reg: '$sgpr7', virtual-reg: '' }
23 - { reg: '$vgpr4', virtual-reg: '' }
26 liveins: $sgpr7, $vgpr4
28 $m0 = S_MOV_B32 killed $sgpr7
30 $vgpr0 = V_INTERP_P1_F32 killed $vgpr4, 0, 0, implicit $m0, implicit $exec
31 SI_RETURN_TO_EPILOG killed $vgpr5, killed $vgpr0
35 # GCN-LABEL: name: hazard_inlineasm
37 # GCN: $m0 = S_MOV_B32
40 # GCN: V_INTERP_P1_F32
42 name: hazard_inlineasm
44 exposesReturnsTwice: false
46 regBankSelected: false
48 tracksRegLiveness: true
51 - { reg: '$sgpr7', virtual-reg: '' }
52 - { reg: '$vgpr4', virtual-reg: '' }
55 liveins: $sgpr7, $vgpr4
57 $m0 = S_MOV_B32 killed $sgpr7
58 INLINEASM &"; no-op", 1, 327690, def $vgpr5
59 $vgpr0 = V_INTERP_P1_F32 killed $vgpr4, 0, 0, implicit $m0, implicit $exec
60 SI_RETURN_TO_EPILOG killed $vgpr5, killed $vgpr0
63 # IMPLICIT_DEF/DBG_VALUE instructions should not prevent the hazard recognizer
64 # from adding s_nop instructions between m0 update and s_sendmsg.
66 # GCN-LABEL: name: hazard-lookahead-implicit-def
67 # GCN: $vgpr6 = IMPLICIT_DEF
70 # GCN: S_SENDMSG 3, implicit $exec, implicit $m0
72 name: hazard-lookahead-implicit-def
75 $m0 = S_MOV_B32 killed $sgpr12
83 S_SENDMSG 3, implicit $exec, implicit $m0
87 # GCN-LABEL: name: hazard-lookahead-dbg-value
91 # GCN: S_SENDMSG 3, implicit $exec, implicit $m0
93 name: hazard-lookahead-dbg-value
96 $m0 = S_MOV_B32 killed $sgpr12
104 S_SENDMSG 3, implicit $exec, implicit $m0
108 # GCN-LABEL: name: hazard-lookahead-dbg-label
112 # GCN: S_SENDMSG 3, implicit $exec, implicit $m0
114 name: hazard-lookahead-dbg-label
117 $m0 = S_MOV_B32 killed $sgpr12
125 S_SENDMSG 3, implicit $exec, implicit $m0