1 # RUN: llc -mtriple=amdgcn -mcpu=gfx90a %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx90a %s --passes=two-address-instruction -o - | FileCheck -check-prefix=GCN %s
4 # GCN-LABEL: name: test_fmamk_reg_imm_f64
5 # GCN: V_FMA_F64_e64 0, killed %0, 0, %2, 0, killed %1, 0, 0, implicit $mode, implicit $exec
7 name: test_fmamk_reg_imm_f64
9 - { id: 0, class: vreg_64_align2 }
10 - { id: 1, class: vreg_64_align2 }
11 - { id: 2, class: vreg_64_align2 }
12 - { id: 3, class: vreg_64_align2 }
18 %2 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
19 %3 = V_FMAC_F64_e32 killed %0, %2, killed %1, implicit $mode, implicit $exec
23 # GCN-LABEL: name: test_fmamk_imm_reg_f64
24 # GCN: V_FMA_F64_e64 0, %2, 0, killed %0.sub0_sub1, 0, killed %1, 0, 0, implicit $mode, implicit $exec
26 name: test_fmamk_imm_reg_f64
28 - { id: 0, class: vreg_128_align2 }
29 - { id: 1, class: vreg_64_align2 }
30 - { id: 2, class: vreg_64_align2 }
31 - { id: 3, class: vreg_64_align2 }
36 %1 = COPY %0.sub2_sub3
37 %2 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
38 %3 = V_FMAC_F64_e32 %2, killed %0.sub0_sub1, killed %1, implicit $mode, implicit $exec
42 # GCN-LABEL: name: test_fmaak_f64
43 # GCN: V_FMA_F64_e64 0, killed %0.sub0_sub1, 0, %0.sub2_sub3, 0, %1, 0, 0, implicit $mode, implicit $exec
47 - { id: 0, class: vreg_128_align2 }
48 - { id: 1, class: vreg_64_align2 }
49 - { id: 2, class: vreg_64_align2 }
54 %1 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
55 %2 = V_FMAC_F64_e32 killed %0.sub0_sub1, %0.sub2_sub3, %1, implicit $mode, implicit $exec
56 S_ENDPGM 0, implicit %1
59 # GCN-LABEL: name: test_fmaak_sgpr_src0_f64
60 # GCN: V_FMA_F64_e64 0, killed %0, 0, %1, 0, %2, 0, 0, implicit $mode, implicit $exec
63 name: test_fmaak_sgpr_src0_f64
65 - { id: 0, class: sreg_64 }
66 - { id: 1, class: vreg_64_align2 }
67 - { id: 2, class: vreg_64_align2 }
68 - { id: 3, class: vreg_64_align2 }
73 %1 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
75 %3 = V_FMAC_F64_e32 killed %0, %1, %2, implicit $mode, implicit $exec
76 S_ENDPGM 0, implicit %2
79 # GCN-LABEL: name: test_fmaak_inlineimm_src0_f64
80 # GCN: V_FMA_F64_e64 0, 4611686018427387904, 0, %0, 0, %1, 0, 0, implicit $mode, implicit $exec
83 name: test_fmaak_inlineimm_src0_f64
85 - { id: 0, class: vreg_64_align2 }
86 - { id: 1, class: vreg_64_align2 }
87 - { id: 2, class: vreg_64_align2 }
91 %0 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
93 %2 = V_FMAC_F64_e32 4611686018427387904, %0, %1, implicit $mode, implicit $exec
94 S_ENDPGM 0, implicit %1
97 # GCN-LABEL: name: test_fmaak_otherimm_src0_f64
98 # GCN: V_FMAC_F64_e32 4636737291354636288, %0, %2, implicit $mode, implicit $exec
101 name: test_fmaak_otherimm_src0_f64
103 - { id: 0, class: vreg_64_align2 }
104 - { id: 1, class: vreg_64_align2 }
105 - { id: 2, class: vreg_64_align2 }
109 %0 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
111 %2 = V_FMAC_F64_e32 4636737291354636288, %0, %1, implicit $mode, implicit $exec
115 # GCN-LABEL: name: test_fmaak_other_constantlike_src0_f64
116 # GCN: V_FMAC_F64_e32 %stack.0, %0, %2, implicit $mode, implicit $exec
118 name: test_fmaak_other_constantlike_src0_f64
120 - { id: 0, class: vreg_64_align2 }
121 - { id: 1, class: vreg_64_align2 }
122 - { id: 2, class: vreg_64_align2 }
124 - { id: 0, name: "", type: default, offset: 0, size: 128, alignment: 8,
125 callee-saved-register: '', local-offset: 0, debug-info-variable: '',
126 debug-info-expression: '', debug-info-location: '' }
130 %0 = V_MOV_B64_PSEUDO 4607182418800017408, implicit $exec
132 %2 = V_FMAC_F64_e32 %stack.0, %0, %1, implicit $mode, implicit $exec
136 # GCN-LABEL: name: test_fmamk_reg_unfoldable_literal_src0_f64
137 # GCN: V_FMA_F64_e64 0, %2, 0, killed %0, 0, killed %1, 0, 0, implicit $mode, implicit $exec
139 name: test_fmamk_reg_unfoldable_literal_src0_f64
141 - { id: 0, class: vreg_64_align2 }
142 - { id: 1, class: vreg_64_align2 }
143 - { id: 2, class: vreg_64_align2 }
144 - { id: 3, class: vreg_64_align2 }
150 %2 = V_MOV_B64_PSEUDO 123456, implicit $exec
151 %3 = V_FMAC_F64_e32 %2, killed %0, killed %1, implicit $mode, implicit $exec
155 # GCN-LABEL: name: test_fmamk_reg_unfoldable_literal_src1_f64
156 # GCN: V_FMA_F64_e64 0, killed %0, 0, %2, 0, killed %1, 0, 0, implicit $mode, implicit $exec
158 name: test_fmamk_reg_unfoldable_literal_src1_f64
160 - { id: 0, class: vreg_64_align2 }
161 - { id: 1, class: vreg_64_align2 }
162 - { id: 2, class: vreg_64_align2 }
163 - { id: 3, class: vreg_64_align2 }
169 %2 = V_MOV_B64_PSEUDO 123456, implicit $exec
170 %3 = V_FMAC_F64_e32 killed %0, %2, killed %1, implicit $mode, implicit $exec
174 # GCN-LABEL: name: test_fmaak_reg_unfoldable_literal_src2_f64
175 # GCN: V_FMA_F64_e64 0, killed %0, 0, killed %1, 0, %2, 0, 0, implicit $mode, implicit $exec
177 name: test_fmaak_reg_unfoldable_literal_src2_f64
179 - { id: 0, class: vreg_64_align2 }
180 - { id: 1, class: vreg_64_align2 }
181 - { id: 2, class: vreg_64_align2 }
182 - { id: 3, class: vreg_64_align2 }
188 %2 = V_MOV_B64_PSEUDO 123456, implicit $exec
189 %3 = V_FMAC_F64_e32 killed %0, killed %1, %2, implicit $mode, implicit $exec
190 S_ENDPGM 0, implicit %2