1 # RUN: llc -march=amdgcn -mcpu=gfx1010 -mattr=-wavefrontsize32,+wavefrontsize64 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefixes=GCN,GFX10 %s
2 # RUN: llc -march=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
4 # GCN-LABEL: name: hazard_vcmpx_smov_exec_lo
5 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
6 # GFX10-NEXT: S_WAITCNT_DEPCTR 65534
7 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
9 name: hazard_vcmpx_smov_exec_lo
13 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
14 $sgpr0 = S_MOV_B32 $exec_lo
15 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
22 # GCN-LABEL: name: hazard_vcmpx_smov_exec
23 # GCN: $sgpr0_sgpr1 = S_MOV_B64 $exec
24 # GFX10-NEXT: S_WAITCNT_DEPCTR 65534
25 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
27 name: hazard_vcmpx_smov_exec
31 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
32 $sgpr0_sgpr1 = S_MOV_B64 $exec
33 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
40 # GCN-LABEL: name: no_hazard_vcmpx_vmov_exec_lo
41 # GCN: $vgpr0 = V_MOV_B32_e32 $exec_lo, implicit $exec
42 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
44 name: no_hazard_vcmpx_vmov_exec_lo
48 $vgpr0 = V_MOV_B32_e32 $exec_lo, implicit $exec
49 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
56 # GCN-LABEL: name: no_hazard_vcmpx_valu_impuse_exec
57 # GCN: $vgpr0 = V_MOV_B32_e32 0, implicit $exec
58 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
60 name: no_hazard_vcmpx_valu_impuse_exec
64 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
65 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
72 # GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_imp
73 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
74 # GCN-NEXT: $vgpr0 = V_ADDC_U32_e32 0, $vgpr0, implicit-def $vcc, implicit $vcc, implicit $exec
75 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
77 name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_imp
81 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
82 $sgpr0 = S_MOV_B32 $exec_lo
83 $vgpr0 = V_ADDC_U32_e32 0, $vgpr0, implicit-def $vcc, implicit $vcc, implicit $exec
84 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
91 # GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_exp
92 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
93 # GCN-NEXT: $sgpr0_sgpr1 = V_CMP_EQ_U32_e64 $vgpr0, 0, implicit $exec
94 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
96 name: no_hazard_vcmpx_smov_exec_lo_valu_writes_sgpr_exp
100 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
101 $sgpr0 = S_MOV_B32 $exec_lo
102 $sgpr0_sgpr1 = V_CMP_EQ_U32_e64 $vgpr0, 0, implicit $exec
103 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
110 # GCN-LABEL: name: no_hazard_vcmpx_smov_exec_lo_depctr_fffe
111 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
112 # GCN-NEXT: S_WAITCNT_DEPCTR 65534
113 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
115 name: no_hazard_vcmpx_smov_exec_lo_depctr_fffe
119 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
120 $sgpr0 = S_MOV_B32 $exec_lo
121 S_WAITCNT_DEPCTR 65534
122 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
129 # GCN-LABEL: name: hazard_vcmpx_smov_exec_lo_depctr_ffff
130 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
131 # GCN-NEXT: S_WAITCNT_DEPCTR 65535
132 # GFX10-NEXT: S_WAITCNT_DEPCTR 65534
133 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
135 name: hazard_vcmpx_smov_exec_lo_depctr_ffff
139 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
140 $sgpr0 = S_MOV_B32 $exec_lo
141 S_WAITCNT_DEPCTR 65535
142 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
149 # GCN-LABEL: name: hazard_vcmpx_smov_exec_lo_depctr_effe
150 # GCN: $sgpr0 = S_MOV_B32 $exec_lo
151 # GCN-NEXT: S_WAITCNT_DEPCTR 61438
152 # GCN-NEXT: V_CMPX_LE_F32_nosdst_e32
154 name: hazard_vcmpx_smov_exec_lo_depctr_effe
158 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
159 $sgpr0 = S_MOV_B32 $exec_lo
160 S_WAITCNT_DEPCTR 61438
161 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec