1 # RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
2 # RUN: llc -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
4 # GCN-LABEL: name: hazard_vcmpx_permlane16
5 # GCN: V_CMPX_LE_F32_nosdst_e32
7 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
8 # GCN-NEXT: V_PERMLANE16_B32_e64
10 name: hazard_vcmpx_permlane16
14 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
15 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
22 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
23 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
27 # GCN-LABEL: name: hazard_vcmpx_permlanex16
28 # GCN: V_CMPX_LE_F32_nosdst_e32
29 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
30 # GCN-NEXT: V_PERMLANEX16_B32_e64
32 name: hazard_vcmpx_permlanex16
36 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
37 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
45 $vgpr1 = V_PERMLANEX16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
49 # GCN-LABEL: name: hazard_vcmpx_permlane16_v_nop
50 # GCN: V_CMPX_LE_F32_nosdst_e32
52 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
53 # GCN-NEXT: V_PERMLANE16_B32_e64
55 name: hazard_vcmpx_permlane16_v_nop
59 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
60 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
68 V_NOP_e32 implicit $exec
69 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
73 # GCN-LABEL: name: hazard_vcmpx_permlane16_far
74 # GCN: V_CMPX_LE_F32_nosdst_e32
75 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
76 # GCN-NEXT: V_PERMLANE16_B32_e64
78 name: hazard_vcmpx_permlane16_far
82 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
83 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
91 V_NOP_e32 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 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
104 # GCN-LABEL: name: hazard_vcmpx_permlane16_no_hazard
105 # GCN: V_CMPX_LE_F32_nosdst_e32
107 # GCN-NEXT: V_PERMLANE16_B32_e64
109 name: hazard_vcmpx_permlane16_no_hazard
113 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
114 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
118 $vgpr1 = IMPLICIT_DEF
119 $sgpr0 = IMPLICIT_DEF
120 $sgpr1 = IMPLICIT_DEF
121 $vgpr2 = V_ADD_F32_e32 $vgpr1, $vgpr1, implicit $mode, implicit $exec
122 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
126 # GCN-LABEL: name: hazard_vcmpx_permlane16_undef_src
127 # GCN: V_CMPX_LE_F32_nosdst_e32
129 # GCN-NEXT: dead $vgpr1 = V_MOV_B32_e32 undef $vgpr1, implicit $exec
130 # GCN-NEXT: V_PERMLANE16_B32_e64
132 name: hazard_vcmpx_permlane16_undef_src
136 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
137 V_CMPX_LE_F32_nosdst_e32 0, $vgpr0, implicit-def $exec, implicit $mode, implicit $exec
141 $vgpr2 = IMPLICIT_DEF
142 $sgpr0 = IMPLICIT_DEF
143 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
144 $vgpr1 = V_PERMLANE16_B32_e64 0, undef $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, undef $vgpr1, 0, implicit $exec
148 # GCN-LABEL: name: hazard_vcmpx_e64_permlane16
149 # GCN: V_CMPX_LE_F32_nosdst_e64
151 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
152 # GCN-NEXT: V_PERMLANE16_B32_e64
154 name: hazard_vcmpx_e64_permlane16
158 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
159 V_CMPX_LE_F32_nosdst_e64 0, 0, 0, $vgpr0, 0, implicit-def $exec, implicit $mode, implicit $exec
163 $vgpr1 = IMPLICIT_DEF
164 $vgpr2 = IMPLICIT_DEF
165 $sgpr0 = IMPLICIT_DEF
166 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
167 $vgpr1 = V_PERMLANE16_B32_e64 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec