1 # RUN: llc -march=amdgcn -run-pass peephole-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
5 # GCN: V_MOV_B32_e32 1092616192
6 # GCN: S_MOV_B32 1082130432
7 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $exec
10 name: test src1-inlined
13 liveins: $vgpr0, $sgpr0_sgpr1
15 %0:vgpr_32 = COPY $vgpr0
16 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
17 %18:sreg_32 = S_MOV_B32 1082130432
18 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $exec
24 # GCN: V_MOV_B32_e32 1092616192
25 # GCN: S_MOV_B32 1082130432
26 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $exec
29 name: test src0-inlined
32 liveins: $vgpr0, $sgpr0_sgpr1
34 %0:vgpr_32 = COPY $vgpr0
35 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
36 %18:sreg_32 = S_MOV_B32 1082130432
37 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $exec
42 # GCN: V_MOV_B32_e32 1092616192
43 # GCN: S_MOV_B32 1082130432
44 # GCN: %3:vgpr_32 = V_MADAK_F32 killed %0, killed %0, 1092616192, implicit $exec
47 name: test none-inlined
50 liveins: $vgpr0, $sgpr0_sgpr1
52 %0:vgpr_32 = COPY $vgpr0
53 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
54 %18:sreg_32 = S_MOV_B32 1082130432
55 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %0, 0, %17, 0, 0, implicit $exec
60 # GCN: V_MOV_B32_e32 1092616192
61 # GCN: V_MOV_B32_e32 1082130432
62 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $exec
65 name: test src1-2vgprs-inlined
68 liveins: $vgpr0, $sgpr0_sgpr1
70 %0:vgpr_32 = COPY $vgpr0
71 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
72 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec
73 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $exec
79 # GCN: V_MOV_B32_e32 1092616192
80 # GCN: V_MOV_B32_e32 1082130432
81 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $exec
84 name: test src0-2vgprs-inlined
87 liveins: $vgpr0, $sgpr0_sgpr1
89 %0:vgpr_32 = COPY $vgpr0
90 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
91 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec
92 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $exec
97 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
98 # GCN: S_MOV_B32 1082130432
99 # GCN: V_MADAK_F32 1082130432, killed $vgpr1, 1092616192, implicit $exec
102 name: test src0-phys-vgpr
105 liveins: $vgpr0, $sgpr0_sgpr1
109 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
110 %18:sgpr_32 = S_MOV_B32 1082130432
111 %19:vgpr_32 = V_MAC_F32_e64 0, killed $vgpr1, 0, killed %18, 0, %17, 0, 0, implicit $exec
116 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
117 # GCN: S_MOV_B32 1082130432
118 # GCN: V_MADAK_F32 1082130432, killed $vgpr0, 1092616192, implicit $exec
121 name: test src1-phys-vgpr
124 liveins: $vgpr0, $sgpr0_sgpr1
127 %0:vgpr_32 = COPY $vgpr0
128 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
129 %18:sgpr_32 = S_MOV_B32 1082130432
130 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed $vgpr0, 0, %17, 0, 0, implicit $exec
135 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
136 # GCN: V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %1, 0, 0, implicit $exec
139 name: test src0-phys-sgpr
142 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2
145 %0:vgpr_32 = COPY $vgpr0
146 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
147 %19:vgpr_32 = V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %17, 0, 0, implicit $exec
152 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
153 # GCN: V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %1, 0, 0, implicit $exec
156 name: test src1-phys-sgpr
159 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2
162 %0:vgpr_32 = COPY $vgpr0
163 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
164 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $exec
169 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
170 # GCN: $sgpr2 = S_MOV_B32 1082130432
171 # GCN: V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $exec
174 name: test src1-phys-sgpr-move
177 liveins: $vgpr0, $sgpr0_sgpr1
180 %0:vgpr_32 = COPY $vgpr0
181 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
182 $sgpr2 = S_MOV_B32 1082130432
183 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $exec