1 # RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass si-insert-skips,post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: hazard_vcmpx_permlane16
4 # GCN: V_CMPX_LE_F32_nosdst_e32
6 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
7 # GCN-NEXT: V_PERMLANE16_B32
9 name: hazard_vcmpx_permlane16
13 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
14 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
21 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
22 $vgpr1 = V_PERMLANE16_B32 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
26 # GCN-LABEL: name: hazard_vcmpx_permlanex16
27 # GCN: V_CMPX_LE_F32_nosdst_e32
28 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
29 # GCN-NEXT: V_PERMLANEX16_B32
31 name: hazard_vcmpx_permlanex16
35 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
36 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
44 $vgpr1 = V_PERMLANEX16_B32 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
48 # GCN-LABEL: name: hazard_vcmpx_permlane16_v_nop
49 # GCN: V_CMPX_LE_F32_nosdst_e32
51 # GCN-NEXT: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
52 # GCN-NEXT: V_PERMLANE16_B32
54 name: hazard_vcmpx_permlane16_v_nop
58 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
59 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
67 V_NOP_e32 implicit $exec
68 $vgpr1 = V_PERMLANE16_B32 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
72 # GCN-LABEL: name: hazard_vcmpx_permlane16_far
73 # GCN: V_CMPX_LE_F32_nosdst_e32
74 # GCN: $vgpr1 = V_MOV_B32_e32 killed $vgpr1, implicit $exec
75 # GCN-NEXT: V_PERMLANE16_B32
77 name: hazard_vcmpx_permlane16_far
81 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
82 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
90 V_NOP_e32 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 $vgpr1 = V_PERMLANE16_B32 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
103 # GCN-LABEL: name: hazard_vcmpx_permlane16_no_hazard
104 # GCN: V_CMPX_LE_F32_nosdst_e32
106 # GCN-NEXT: V_PERMLANE16_B32
108 name: hazard_vcmpx_permlane16_no_hazard
112 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
113 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
117 $vgpr1 = IMPLICIT_DEF
118 $sgpr0 = IMPLICIT_DEF
119 $sgpr1 = IMPLICIT_DEF
120 $vgpr2 = V_ADD_F32_e32 $vgpr1, $vgpr1, implicit $exec
121 $vgpr1 = V_PERMLANE16_B32 0, killed $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, $vgpr1, 0, implicit $exec
125 # GCN-LABEL: name: hazard_vcmpx_permlane16_undef_src
126 # GCN: V_CMPX_LE_F32_nosdst_e32
128 # GCN-NEXT: dead $vgpr1 = V_MOV_B32_e32 undef $vgpr1, implicit $exec
129 # GCN-NEXT: V_PERMLANE16_B32
131 name: hazard_vcmpx_permlane16_undef_src
135 $vgpr0 = V_MOV_B32_e32 0, implicit $exec
136 SI_KILL_F32_COND_IMM_TERMINATOR $vgpr0, 0, 3, implicit-def $exec, implicit-def $vcc, implicit-def $scc, implicit $exec
140 $vgpr2 = IMPLICIT_DEF
141 $sgpr0 = IMPLICIT_DEF
142 $sgpr1 = S_ADD_U32 $sgpr0, 0, implicit-def $scc
143 $vgpr1 = V_PERMLANE16_B32 0, undef $vgpr1, 0, killed $sgpr1, 0, killed $sgpr0, undef $vgpr1, 0, implicit $exec