1 # RUN: llc -mtriple=amdgcn -run-pass peephole-opt -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
5 # GCN: S_MOV_B32 1082130432
6 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec
9 name: test src1-inlined
12 liveins: $vgpr0, $sgpr0_sgpr1
14 %0:vgpr_32 = COPY $vgpr0
15 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
16 %18:sreg_32 = S_MOV_B32 1082130432
17 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec
23 # GCN: S_MOV_B32 1082130432
24 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec
27 name: test src0-inlined
30 liveins: $vgpr0, $sgpr0_sgpr1
32 %0:vgpr_32 = COPY $vgpr0
33 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
34 %18:sreg_32 = S_MOV_B32 1082130432
35 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec
40 # GCN: S_MOV_B32 1082130432
41 # GCN: %3:vgpr_32 = V_MADAK_F32 killed %0, killed %0, 1092616192, implicit $mode, implicit $exec
44 name: test none-inlined
47 liveins: $vgpr0, $sgpr0_sgpr1
49 %0:vgpr_32 = COPY $vgpr0
50 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
51 %18:sreg_32 = S_MOV_B32 1082130432
52 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec
57 # GCN: V_MOV_B32_e32 1082130432
58 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec
61 name: test src1-2vgprs-inlined
64 liveins: $vgpr0, $sgpr0_sgpr1
66 %0:vgpr_32 = COPY $vgpr0
67 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
68 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec
69 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec
75 # GCN: V_MOV_B32_e32 1082130432
76 # GCN: %3:vgpr_32 = V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec
79 name: test src0-2vgprs-inlined
82 liveins: $vgpr0, $sgpr0_sgpr1
84 %0:vgpr_32 = COPY $vgpr0
85 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
86 %18:vgpr_32 = V_MOV_B32_e32 1082130432, implicit $exec
87 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec
92 # GCN: S_MOV_B32 1082130432
93 # GCN: V_MADAK_F32 1082130432, killed $vgpr1, 1092616192, implicit $mode, implicit $exec
96 name: test src0-phys-vgpr
99 liveins: $vgpr0, $sgpr0_sgpr1
103 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
104 %18:sgpr_32 = S_MOV_B32 1082130432
105 %19:vgpr_32 = V_MAC_F32_e64 0, killed $vgpr1, 0, killed %18, 0, %17, 0, 0, implicit $mode, implicit $exec
110 # GCN: S_MOV_B32 1082130432
111 # GCN: V_MADAK_F32 1082130432, killed $vgpr0, 1092616192, implicit $mode, implicit $exec
114 name: test src1-phys-vgpr
117 liveins: $vgpr0, $sgpr0_sgpr1
120 %0:vgpr_32 = COPY $vgpr0
121 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
122 %18:sgpr_32 = S_MOV_B32 1082130432
123 %19:vgpr_32 = V_MAC_F32_e64 0, killed %18, 0, killed $vgpr0, 0, %17, 0, 0, implicit $mode, implicit $exec
128 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
129 # GCN: V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %1, 0, 0, implicit $mode, implicit $exec
132 name: test src0-phys-sgpr
135 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2
138 %0:vgpr_32 = COPY $vgpr0
139 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
140 %19:vgpr_32 = V_MAC_F32_e64 0, killed $sgpr2, 0, killed %0, 0, %17, 0, 0, implicit $mode, implicit $exec
145 # GCN: V_MOV_B32_e32 1092616192, implicit $exec
146 # GCN: V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %1, 0, 0, implicit $mode, implicit $exec
149 name: test src1-phys-sgpr
152 liveins: $vgpr0, $sgpr0_sgpr1, $sgpr2
155 %0:vgpr_32 = COPY $vgpr0
156 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
157 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $mode, implicit $exec
162 # GCN: $sgpr2 = S_MOV_B32 1082130432
163 # GCN: V_MADAK_F32 1082130432, killed %0, 1092616192, implicit $mode, implicit $exec
166 name: test src1-phys-sgpr-move
169 liveins: $vgpr0, $sgpr0_sgpr1
172 %0:vgpr_32 = COPY $vgpr0
173 %17:vgpr_32 = V_MOV_B32_e32 1092616192, implicit $exec
174 $sgpr2 = S_MOV_B32 1082130432
175 %19:vgpr_32 = V_MAC_F32_e64 0, killed %0, 0, killed $sgpr2, 0, %17, 0, 0, implicit $mode, implicit $exec