1 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
5 # GCN-LABEL: name: hazard_vcmpx_permlane16
6 # GCN: V_CMPX_LE_F32_nosdst_e32
8 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
9 # GCN-NEXT: V_PERMLANE16_B32_e64
11 name: hazard_vcmpx_permlane16
15 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
16 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
23 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
24 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
28 # GCN-LABEL: name: hazard_vcmpx_permlanex16
29 # GCN: V_CMPX_LE_F32_nosdst_e32
30 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
31 # GCN-NEXT: V_PERMLANEX16_B32_e64
33 name: hazard_vcmpx_permlanex16
37 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
38 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
46 $vgpr1 = V_PERMLANEX16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
50 # GCN-LABEL: name: hazard_vcmpx_permlane16_v_nop
51 # GCN: V_CMPX_LE_F32_nosdst_e32
53 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
54 # GCN-NEXT: V_PERMLANE16_B32_e64
56 name: hazard_vcmpx_permlane16_v_nop
60 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
61 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
69 V_NOP_e32 implicit $exec
70 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
74 # GCN-LABEL: name: hazard_vcmpx_permlane16_far
75 # GCN: V_CMPX_LE_F32_nosdst_e32
76 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
77 # GCN-NEXT: V_PERMLANE16_B32_e64
79 name: hazard_vcmpx_permlane16_far
83 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
84 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
92 V_NOP_e32 implicit $exec
93 V_NOP_e32 implicit $exec
94 V_NOP_e32 implicit $exec
95 V_NOP_e32 implicit $exec
96 V_NOP_e32 implicit $exec
97 V_NOP_e32 implicit $exec
98 V_NOP_e32 implicit $exec
99 V_NOP_e32 implicit $exec
100 V_NOP_e32 implicit $exec
101 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
105 # GCN-LABEL: name: hazard_vcmpx_permlane16_no_hazard
106 # GCN: V_CMPX_LE_F32_nosdst_e32
108 # GCN-NEXT: V_PERMLANE16_B32_e64
110 name: hazard_vcmpx_permlane16_no_hazard
114 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
115 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
119 $vgpr1 = IMPLICIT_DEF
120 $sgpr0 = IMPLICIT_DEF
121 $sgpr1 = IMPLICIT_DEF
122 $vgpr2 = V_ADD_F32_e32 $vgpr1, $vgpr1, implicit $mode, implicit $exec
123 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
127 # GCN-LABEL: name: hazard_vcmpx_permlane16_undef_src
128 # GCN: V_CMPX_LE_F32_nosdst_e32
130 # GCN-NEXT: dead $vgpr1 = V_MOV_B32_e32 undef $vgpr1, implicit $exec
131 # GCN-NEXT: V_PERMLANE16_B32_e64
133 name: hazard_vcmpx_permlane16_undef_src
137 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
138 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
142 $vgpr2 = IMPLICIT_DEF
143 $sgpr0 = IMPLICIT_DEF
144 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
145 $vgpr1 = V_PERMLANE16_B32_e64 0, undef $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, undef $vgpr1, 0, implicit $exec
149 # GCN-LABEL: name: hazard_vcmpx_e64_permlane16
150 # GCN: V_CMPX_LE_F32_nosdst_e64
152 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
153 # GCN-NEXT: V_PERMLANE16_B32_e64
155 name: hazard_vcmpx_e64_permlane16
159 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
160 V_CMPX_LE_F32_nosdst_e64 0, 0, 0, $vgpr0, 0, implicit-def $exec, implicit $mode, implicit $exec
164 $vgpr1 = IMPLICIT_DEF
165 $vgpr2 = IMPLICIT_DEF
166 $sgpr0 = IMPLICIT_DEF
167 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
168 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
172 # GCN-LABEL: name: hazard_vcmpx_permlane64
173 # GCN: V_CMPX_LE_F32_nosdst_e32
175 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
176 # GCN-NEXT: V_PERMLANE64_B32
178 name: hazard_vcmpx_permlane64
182 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
183 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
187 $vgpr1 = IMPLICIT_DEF
188 $vgpr2 = IMPLICIT_DEF
189 $sgpr0 = IMPLICIT_DEF
190 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
191 $vgpr1 = V_PERMLANE64_B32 killed $vgpr1, implicit $exec