Line data Source code
1 : ;; GCC machine description for AVX512F instructions
2 : ;; Copyright (C) 2013-2026 Free Software Foundation, Inc.
3 : ;;
4 : ;; This file is part of GCC.
5 : ;;
6 : ;; GCC is free software; you can redistribute it and/or modify
7 : ;; it under the terms of the GNU General Public License as published by
8 : ;; the Free Software Foundation; either version 3, or (at your option)
9 : ;; any later version.
10 : ;;
11 : ;; GCC is distributed in the hope that it will be useful,
12 : ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 : ;; GNU General Public License for more details.
15 : ;;
16 : ;; You should have received a copy of the GNU General Public License
17 : ;; along with GCC; see the file COPYING3. If not see
18 : ;; <http://www.gnu.org/licenses/>.
19 :
20 : ;; Some iterators for extending subst as much as possible
21 : ;; All vectors (Use it for destination)
22 : (define_mode_iterator SUBST_V
23 : [V64QI V32QI V16QI
24 : V32HI V16HI V8HI
25 : V16SI V8SI V4SI
26 : V8DI V4DI V2DI
27 : V32HF V16HF V8HF
28 : V32BF V16BF V8BF
29 : V16SF V8SF V4SF
30 : V8DF V4DF V2DF])
31 :
32 : (define_mode_iterator SUBST_CV
33 : [V32HF V16HF V8HF])
34 :
35 : (define_mode_iterator SUBST_S
36 : [QI HI SI DI])
37 :
38 : (define_mode_iterator SUBST_A
39 : [V64QI V32QI V16QI
40 : V32HI V16HI V8HI
41 : V16SI V8SI V4SI
42 : V8DI V4DI V2DI
43 : V32HF V16HF V8HF
44 : V16SF V8SF V4SF
45 : V8DF V4DF V2DF
46 : QI HI SI DI SF DF])
47 :
48 : (define_subst_attr "mask_name" "mask" "" "_mask")
49 : (define_subst_attr "maskc_name" "maskc" "" "_mask")
50 : (define_subst_attr "mask_applied" "mask" "false" "true")
51 : (define_subst_attr "mask_operand2" "mask" "" "%{%3%}%N2")
52 : (define_subst_attr "mask_operand3" "mask" "" "%{%4%}%N3")
53 : (define_subst_attr "maskc_operand3" "maskc" "" "%{%4%}%N3")
54 : (define_subst_attr "mask_operand3_1" "mask" "" "%%{%%4%%}%%N3") ;; for sprintf
55 : (define_subst_attr "mask_operand4" "mask" "" "%{%5%}%N4")
56 : (define_subst_attr "mask_operand6" "mask" "" "%{%7%}%N6")
57 : (define_subst_attr "mask_operand7" "mask" "" "%{%8%}%N7")
58 : (define_subst_attr "mask_operand10" "mask" "" "%{%11%}%N10")
59 : (define_subst_attr "mask_operand11" "mask" "" "%{%12%}%N11")
60 : (define_subst_attr "mask_operand18" "mask" "" "%{%19%}%N18")
61 : (define_subst_attr "mask_operand19" "mask" "" "%{%20%}%N19")
62 : (define_subst_attr "mask_codefor" "mask" "*" "")
63 : (define_subst_attr "mask_operand_arg34" "mask" "" ", operands[3], operands[4]")
64 : (define_subst_attr "mask_mode512bit_condition" "mask" "1" "(<MODE_SIZE> == 64 || TARGET_AVX512VL)")
65 : (define_subst_attr "mask_avx512vl_condition" "mask" "1" "TARGET_AVX512VL")
66 : (define_subst_attr "mask_avx512bw_condition" "mask" "1" "TARGET_AVX512BW")
67 : (define_subst_attr "mask_avx512dq_condition" "mask" "1" "TARGET_AVX512DQ")
68 : (define_subst_attr "mask_prefix" "mask" "vex" "evex")
69 : (define_subst_attr "mask_prefix2" "mask" "maybe_vex" "evex")
70 : (define_subst_attr "mask_prefix3" "mask" "orig,vex" "evex,evex")
71 : (define_subst_attr "bcst_mask_prefix3" "mask" "orig,maybe_evex" "evex,evex")
72 : (define_subst_attr "bcst_mask_prefix4" "mask" "orig,orig,maybe_evex" "evex,evex,evex")
73 : (define_subst_attr "mask_expand_op3" "mask" "3" "5")
74 : (define_subst_attr "mask3_dest_false_dep_for_glc_cond" "mask" "1" "operands[3] == CONST0_RTX(<MODE>mode)")
75 : (define_subst_attr "mask4_dest_false_dep_for_glc_cond" "mask" "1" "operands[4] == CONST0_RTX(<MODE>mode)")
76 : (define_subst_attr "mask6_dest_false_dep_for_glc_cond" "mask" "1" "operands[6] == CONST0_RTX(<MODE>mode)")
77 : (define_subst_attr "mask10_dest_false_dep_for_glc_cond" "mask" "1" "operands[10] == CONST0_RTX(<MODE>mode)")
78 : (define_subst_attr "maskc_dest_false_dep_for_glc_cond" "maskc" "1" "operands[3] == CONST0_RTX(<MODE>mode)")
79 :
80 : (define_subst "mask"
81 : [(set (match_operand:SUBST_V 0)
82 : (match_operand:SUBST_V 1))]
83 152826 : "TARGET_AVX512F"
84 : [(set (match_dup 0)
85 : (vec_merge:SUBST_V
86 : (match_dup 1)
87 : (match_operand:SUBST_V 2 "nonimm_or_0_operand" "0C")
88 : (match_operand:<avx512fmaskmode> 3 "register_operand" "Yk")))])
89 :
90 : (define_subst_attr "merge_mask_name" "merge_mask" "" "_merge_mask")
91 : (define_subst_attr "merge_mask_operand3" "merge_mask" "" "%{%3%}")
92 : (define_subst "merge_mask"
93 : [(set (match_operand:SUBST_V 0)
94 : (match_operand:SUBST_V 1))]
95 : "TARGET_AVX512F"
96 : [(set (match_dup 0)
97 : (vec_merge:SUBST_V
98 : (match_dup 1)
99 : (match_dup 0)
100 : (match_operand:<avx512fmaskmode> 2 "register_operand" "Yk")))])
101 :
102 : (define_subst "maskc"
103 : [(set (match_operand:SUBST_CV 0)
104 : (match_operand:SUBST_CV 1))]
105 1856 : "TARGET_AVX512F"
106 : [(set (match_dup 0)
107 : (vec_merge:SUBST_CV
108 : (match_dup 1)
109 : (match_operand:SUBST_CV 2 "nonimm_or_0_operand" "0C")
110 : (unspec:<avx512fmaskmode>
111 : [(match_operand:<avx512fmaskcmode> 3 "register_operand" "Yk")]
112 : UNSPEC_COMPLEX_MASK)))])
113 :
114 : (define_subst_attr "mask_scalar_merge_name" "mask_scalar_merge" "" "_mask")
115 : (define_subst_attr "mask_scalar_merge_operand3" "mask_scalar_merge" "" "%{%3%}")
116 : (define_subst_attr "mask_scalar_merge_operand4" "mask_scalar_merge" "" "%{%4%}")
117 :
118 : (define_subst "mask_scalar_merge"
119 : [(set (match_operand:SUBST_S 0)
120 : (match_operand:SUBST_S 1))]
121 56719 : "TARGET_AVX512F"
122 : [(set (match_dup 0)
123 : (and:SUBST_S
124 : (match_dup 1)
125 : (match_operand:SUBST_S 3 "register_operand" "Yk")))])
126 :
127 : (define_subst_attr "sd_maskz_name" "sd" "" "_maskz_1")
128 : (define_subst_attr "sd_mask_op4" "sd" "" "%{%5%}%N4")
129 : (define_subst_attr "sd_mask_op5" "sd" "" "%{%6%}%N5")
130 : (define_subst_attr "sd_mask_codefor" "sd" "*" "")
131 : (define_subst_attr "sd_mask_mode512bit_condition" "sd" "1" "(<MODE_SIZE> == 64 || TARGET_AVX512VL)")
132 :
133 : (define_subst "sd"
134 : [(set (match_operand:SUBST_V 0)
135 : (match_operand:SUBST_V 1))]
136 : ""
137 : [(set (match_dup 0)
138 : (vec_merge:SUBST_V
139 : (match_dup 1)
140 : (match_operand:SUBST_V 2 "const0_operand")
141 : (match_operand:<avx512fmaskmode> 3 "register_operand" "Yk")))
142 : ])
143 :
144 : (define_subst_attr "maskz_scalar_name" "maskz_scalar" "" "_maskz_1")
145 : (define_subst_attr "maskz_scalar_op5" "maskz_scalar" "" "%{%6%}%N5")
146 :
147 : (define_subst "maskz_scalar"
148 : [(set (match_operand:SUBST_V 0)
149 : (vec_merge:SUBST_V
150 : (match_operand:SUBST_V 1)
151 : (match_operand:SUBST_V 2)
152 : (const_int 1)))]
153 : "TARGET_AVX512F"
154 : [(set (match_dup 0)
155 : (vec_merge:SUBST_V
156 : (vec_merge:SUBST_V
157 : (match_dup 1)
158 : (match_operand:SUBST_V 3 "const0_operand")
159 : (match_operand:<avx512fmaskmode> 4 "register_operand" "Yk"))
160 : (match_dup 2)
161 : (const_int 1)))])
162 : (define_subst_attr "sdc_maskz_name" "sdc" "" "_maskz_1")
163 : (define_subst_attr "sdc_mask_op4" "sdc" "" "%{%5%}%N4")
164 : (define_subst_attr "sdc_mask_mode512bit_condition" "sdc" "1" "(<MODE_SIZE> == 64 || TARGET_AVX512VL)")
165 :
166 : (define_subst "sdc"
167 : [(set (match_operand:SUBST_CV 0)
168 : (match_operand:SUBST_CV 1))]
169 : ""
170 : [(set (match_dup 0)
171 : (vec_merge:SUBST_CV
172 : (match_dup 1)
173 : (match_operand:SUBST_CV 2 "const0_operand")
174 : (unspec:<avx512fmaskmode>
175 : [(match_operand:<avx512fmaskcmode> 3 "register_operand" "Yk")]
176 : UNSPEC_COMPLEX_MASK)))
177 : ])
178 :
179 : (define_subst_attr "round_name" "round" "" "_round")
180 : (define_subst_attr "round_mask_operand2" "mask" "%R2" "%R4")
181 : (define_subst_attr "round_mask_operand3" "mask" "%R3" "%R5")
182 : (define_subst_attr "round_maskc_operand3" "maskc" "%R3" "%R5")
183 : (define_subst_attr "round_sd_mask_operand4" "sd" "%R4" "%R6")
184 : (define_subst_attr "round_sdc_mask_operand4" "sdc" "%R4" "%R6")
185 : (define_subst_attr "round_op2" "round" "" "%R2")
186 : (define_subst_attr "round_op3" "round" "" "%R3")
187 : (define_subst_attr "round_op4" "round" "" "%R4")
188 : (define_subst_attr "round_op5" "round" "" "%R5")
189 : (define_subst_attr "round_op6" "round" "" "%R6")
190 : (define_subst_attr "round_mask_op2" "round" "" "<round_mask_operand2>")
191 : (define_subst_attr "round_mask_op3" "round" "" "<round_mask_operand3>")
192 : (define_subst_attr "round_maskc_op3" "round" "" "<round_maskc_operand3>")
193 : (define_subst_attr "round_sd_mask_op4" "round" "" "<round_sd_mask_operand4>")
194 : (define_subst_attr "round_sdc_mask_op4" "round" "" "<round_sdc_mask_operand4>")
195 : (define_subst_attr "round_constraint" "round" "vm" "v")
196 : (define_subst_attr "round_qq2phsuff" "round" "<qq2phsuff>" "")
197 : (define_subst_attr "bcst_round_constraint" "round" "vmBr" "v")
198 : (define_subst_attr "round_constraint2" "round" "m" "v")
199 : (define_subst_attr "round_constraint3" "round" "rm" "r")
200 : (define_subst_attr "round_nimm_predicate" "round" "vector_operand" "register_operand")
201 : (define_subst_attr "bcst_round_nimm_predicate" "round" "bcst_vector_operand" "register_operand")
202 : (define_subst_attr "round_nimm_scalar_predicate" "round" "nonimmediate_operand" "register_operand")
203 : (define_subst_attr "round_prefix" "round" "vex" "evex")
204 : (define_subst_attr "round_mode512bit_condition" "round" "1" "(<MODE>mode == V16SFmode
205 : || <MODE>mode == V8DFmode
206 : || <MODE>mode == V8DImode
207 : || <MODE>mode == V16SImode
208 : || <MODE>mode == V32HFmode)")
209 :
210 : (define_subst_attr "round_modev4sf_condition" "round" "1" "(<MODE>mode == V4SFmode)")
211 :
212 : (define_subst "round"
213 : [(set (match_operand:SUBST_A 0)
214 : (match_operand:SUBST_A 1))]
215 28515 : "TARGET_AVX512F"
216 : [(set (match_dup 0)
217 : (unspec:SUBST_A [(match_dup 1)
218 : (match_operand:SI 2 "const_4_or_8_to_11_operand")]
219 : UNSPEC_EMBEDDED_ROUNDING))
220 : ])
221 :
222 : (define_subst_attr "round_saeonly_name" "round_saeonly" "" "_round")
223 : (define_subst_attr "round_saeonly_mask_operand2" "mask" "%r2" "%r4")
224 : (define_subst_attr "round_saeonly_mask_operand3" "mask" "%r3" "%r5")
225 : (define_subst_attr "round_saeonly_mask_operand4" "mask" "%r4" "%r6")
226 : (define_subst_attr "round_saeonly_mask_scalar_merge_operand4" "mask_scalar_merge" "%r4" "%r5")
227 : (define_subst_attr "round_saeonly_maskz_scalar_operand5" "maskz_scalar" "%r5" "%r7")
228 : (define_subst_attr "round_saeonly_sd_mask_operand5" "sd" "%r5" "%r7")
229 : (define_subst_attr "round_saeonly_op2" "round_saeonly" "" "%r2")
230 : (define_subst_attr "round_saeonly_op4" "round_saeonly" "" "%r4")
231 : (define_subst_attr "round_saeonly_op5" "round_saeonly" "" "%r5")
232 : (define_subst_attr "round_saeonly_op6" "round_saeonly" "" "%r6")
233 : (define_subst_attr "round_saeonly_prefix" "round_saeonly" "vex" "evex")
234 : (define_subst_attr "round_saeonly_mask_op2" "round_saeonly" "" "<round_saeonly_mask_operand2>")
235 : (define_subst_attr "round_saeonly_mask_op3" "round_saeonly" "" "<round_saeonly_mask_operand3>")
236 : (define_subst_attr "round_saeonly_mask_op4" "round_saeonly" "" "<round_saeonly_mask_operand4>")
237 : (define_subst_attr "round_saeonly_mask_scalar_merge_op4" "round_saeonly" "" "<round_saeonly_mask_scalar_merge_operand4>")
238 : (define_subst_attr "round_saeonly_sd_mask_op5" "round_saeonly" "" "<round_saeonly_sd_mask_operand5>")
239 : (define_subst_attr "round_saeonly_maskz_scalar_op5" "round_saeonly" "" "<round_saeonly_maskz_scalar_operand5>")
240 : (define_subst_attr "round_saeonly_mask_arg3" "round_saeonly" "" ", operands[<mask_expand_op3>]")
241 : (define_subst_attr "round_saeonly_constraint" "round_saeonly" "vm" "v")
242 : (define_subst_attr "round_saeonly_constraint2" "round_saeonly" "m" "v")
243 : (define_subst_attr "round_saeonly_nimm_predicate" "round_saeonly" "vector_operand" "register_operand")
244 : (define_subst_attr "round_saeonly_nimm_scalar_predicate" "round_saeonly" "nonimmediate_operand" "register_operand")
245 : (define_subst_attr "round_saeonly_mode512bit_condition" "round_saeonly" "1" "(<MODE>mode == V16SFmode
246 : || <MODE>mode == V8DFmode
247 : || <MODE>mode == V8DImode
248 : || <MODE>mode == V16SImode
249 : || <MODE>mode == V32HFmode)")
250 :
251 :
252 : (define_subst "round_saeonly"
253 : [(set (match_operand:SUBST_A 0)
254 : (match_operand:SUBST_A 1))]
255 37927 : "TARGET_AVX512F"
256 : [(set (match_dup 0)
257 : (unspec:SUBST_A [(match_dup 1)
258 : (match_operand:SI 2 "const48_operand")]
259 : UNSPEC_EMBEDDED_ROUNDING))
260 : ])
261 :
262 : (define_subst "round_saeonly"
263 : [(set (match_operand:CCFP 0)
264 : (match_operand:CCFP 1))]
265 17559 : "TARGET_AVX512F"
266 : [(set (match_dup 0)
267 : (unspec:CCFP [(match_dup 1)
268 : (match_operand:SI 2 "const48_operand")]
269 : UNSPEC_EMBEDDED_ROUNDING))
270 : ])
271 :
272 : (define_subst_attr "round_expand_name" "round_expand" "" "_round")
273 : (define_subst_attr "round_expand_nimm_predicate" "round_expand" "nonimmediate_operand" "register_operand")
274 : (define_subst_attr "round_expand_operand" "round_expand" "" ", operands[5]")
275 : (define_subst_attr "round_embedded_complex" "round_expand" "0" "!(CONST_INT_P (operands[5])
276 : && (INTVAL (operands[5])
277 : == NO_ROUND))")
278 :
279 : (define_subst "round_expand"
280 : [(match_operand:SUBST_V 0)
281 : (match_operand:SUBST_V 1)
282 : (match_operand:SUBST_V 2)
283 : (match_operand:SUBST_V 3)
284 : (match_operand:SUBST_S 4)]
285 : "TARGET_AVX512F"
286 : [(match_dup 0)
287 : (match_dup 1)
288 : (match_dup 2)
289 : (match_dup 3)
290 : (match_dup 4)
291 : (unspec [(match_operand:SI 5 "const_4_or_8_to_11_operand")] UNSPEC_EMBEDDED_ROUNDING)])
292 :
293 : (define_subst_attr "round_saeonly_expand_name" "round_saeonly_expand" "" "_round")
294 : (define_subst_attr "round_saeonly_expand_nimm_predicate" "round_saeonly_expand" "nonimmediate_operand" "register_operand")
295 : (define_subst_attr "round_saeonly_expand_operand6" "round_saeonly_expand" "" ", operands[6]")
296 :
297 : (define_subst "round_saeonly_expand"
298 : [(match_operand:SUBST_V 0)
299 : (match_operand:SUBST_V 1)
300 : (match_operand:SUBST_V 2)
301 : (match_operand:SUBST_A 3)
302 : (match_operand:SI 4)
303 : (match_operand:SUBST_S 5)]
304 : "TARGET_AVX512F"
305 : [(match_dup 0)
306 : (match_dup 1)
307 : (match_dup 2)
308 : (match_dup 3)
309 : (match_dup 4)
310 : (match_dup 5)
311 : (unspec [(match_operand:SI 6 "const48_operand")] UNSPEC_EMBEDDED_ROUNDING)])
312 :
313 : (define_subst_attr "mask_expand4_name" "mask_expand4" "" "_mask")
314 : (define_subst_attr "mask_expand4_args" "mask_expand4" "" ", operands[4], operands[5]")
315 :
316 : (define_subst "mask_expand4"
317 : [(match_operand:SUBST_V 0)
318 : (match_operand:SUBST_V 1)
319 : (match_operand:SUBST_V 2)
320 : (match_operand:SI 3)]
321 : "TARGET_AVX512VL"
322 : [(match_dup 0)
323 : (match_dup 1)
324 : (match_dup 2)
325 : (match_dup 3)
326 : (match_operand:SUBST_V 4 "nonimm_or_0_operand")
327 : (match_operand:<avx512fmaskmode> 5 "register_operand")])
328 :
329 : (define_subst_attr "mask_scalar_name" "mask_scalar" "" "_mask")
330 : (define_subst_attr "mask_scalarcz_name" "mask_scalarcz" "" "_maskz")
331 : (define_subst_attr "mask_scalarc_name" "mask_scalarc" "" "_mask")
332 : (define_subst_attr "mask_scalarc_operand3" "mask_scalarc" "" "%{%4%}%N3")
333 : (define_subst_attr "mask_scalar_operand3" "mask_scalar" "" "%{%4%}%N3")
334 : (define_subst_attr "mask_scalar_operand4" "mask_scalar" "" "%{%5%}%N4")
335 : (define_subst_attr "mask_scalarcz_operand4" "mask_scalarcz" "" "%{%5%}%N4")
336 : (define_subst_attr "mask_scalar4_dest_false_dep_for_glc_cond" "mask_scalar" "1" "operands[4] == CONST0_RTX(<MODE>mode)")
337 : (define_subst_attr "mask_scalarc_dest_false_dep_for_glc_cond" "mask_scalarc" "1" "operands[3] == CONST0_RTX(V8HFmode)")
338 : (define_subst_attr "mask_scalar_operand_arg34" "mask_scalar" "" ", operands[3], operands[4]")
339 : (define_subst_attr "mask_scalar_expand_op3" "mask_scalar" "3" "5")
340 :
341 : (define_subst "mask_scalar"
342 : [(set (match_operand:SUBST_V 0)
343 : (vec_merge:SUBST_V
344 : (match_operand:SUBST_V 1)
345 : (match_operand:SUBST_V 2)
346 : (const_int 1)))]
347 11250 : "TARGET_AVX512F"
348 : [(set (match_dup 0)
349 : (vec_merge:SUBST_V
350 : (vec_merge:SUBST_V
351 : (match_dup 1)
352 : (match_operand:SUBST_V 3 "nonimm_or_0_operand" "0C")
353 : (match_operand:<avx512fmaskmode> 4 "register_operand" "Yk"))
354 : (match_dup 2)
355 : (const_int 1)))])
356 :
357 : (define_subst "mask_scalarcz"
358 : [(set (match_operand:SUBST_CV 0)
359 : (vec_merge:SUBST_CV
360 : (match_operand:SUBST_CV 1)
361 : (match_operand:SUBST_CV 2)
362 : (const_int 3)))]
363 : "TARGET_AVX512F"
364 : [(set (match_dup 0)
365 : (vec_merge:SUBST_CV
366 : (vec_merge:SUBST_CV
367 : (match_dup 1)
368 : (match_operand:SUBST_CV 3 "const0_operand")
369 : (unspec:<avx512fmaskmode>
370 : [(match_operand:<avx512fmaskcmode> 4 "register_operand" "Yk")]
371 : UNSPEC_COMPLEX_MASK))
372 : (match_dup 2)
373 : (const_int 3)))])
374 :
375 : (define_subst "mask_scalarc"
376 : [(set (match_operand:SUBST_CV 0)
377 : (vec_merge:SUBST_CV
378 : (match_operand:SUBST_CV 1)
379 : (match_operand:SUBST_CV 2)
380 : (const_int 3)))]
381 : "TARGET_AVX512F"
382 : [(set (match_dup 0)
383 : (vec_merge:SUBST_CV
384 : (vec_merge:SUBST_CV
385 : (match_dup 1)
386 : (match_operand:SUBST_CV 3 "nonimm_or_0_operand" "0C")
387 : (unspec:<avx512fmaskmode>
388 : [(match_operand:<avx512fmaskcmode> 4 "register_operand" "Yk")]
389 : UNSPEC_COMPLEX_MASK))
390 : (match_dup 2)
391 : (const_int 3)))])
392 :
393 : (define_subst_attr "round_scalar_name" "round_scalar" "" "_round")
394 : (define_subst_attr "round_scalarcz_name" "round_scalarcz" "" "_round")
395 : (define_subst_attr "round_scalar_mask_operand3" "mask_scalar" "%R3" "%R5")
396 : (define_subst_attr "round_scalarc_mask_operand3" "mask_scalarc" "%R3" "%R5")
397 : (define_subst_attr "round_scalarcz_mask_operand4" "mask_scalarcz" "%R4" "%R6")
398 : (define_subst_attr "round_scalar_mask_op3" "round_scalar" "" "<round_scalar_mask_operand3>")
399 : (define_subst_attr "round_scalarc_mask_op3" "round_scalarcz" "" "<round_scalarc_mask_operand3>")
400 : (define_subst_attr "round_scalarcz_mask_op4" "round_scalarcz" "" "<round_scalarcz_mask_operand4>")
401 : (define_subst_attr "round_scalar_constraint" "round_scalar" "vm" "v")
402 : (define_subst_attr "round_scalarcz_constraint" "round_scalarcz" "vm" "v")
403 : (define_subst_attr "round_scalar_prefix" "round_scalar" "vex" "evex")
404 : (define_subst_attr "round_scalar_nimm_predicate" "round_scalar" "nonimmediate_operand" "register_operand")
405 : (define_subst_attr "round_scalarcz_nimm_predicate" "round_scalarcz" "vector_operand" "register_operand")
406 :
407 : (define_subst "round_scalar"
408 : [(set (match_operand:SUBST_V 0)
409 : (vec_merge:SUBST_V
410 : (match_operand:SUBST_V 1)
411 : (match_operand:SUBST_V 2)
412 : (const_int 1)))]
413 6046 : "TARGET_AVX512F"
414 : [(set (match_dup 0)
415 : (unspec:SUBST_V [
416 : (vec_merge:SUBST_V
417 : (match_dup 1)
418 : (match_dup 2)
419 : (const_int 1))
420 : (match_operand:SI 3 "const_4_or_8_to_11_operand")]
421 : UNSPEC_EMBEDDED_ROUNDING))])
422 :
423 : (define_subst "round_scalarcz"
424 : [(set (match_operand:SUBST_V 0)
425 : (vec_merge:SUBST_V
426 : (match_operand:SUBST_V 1)
427 : (match_operand:SUBST_V 2)
428 : (const_int 3)))]
429 : "TARGET_AVX512F"
430 : [(set (match_dup 0)
431 : (unspec:SUBST_V [
432 : (vec_merge:SUBST_V
433 : (match_dup 1)
434 : (match_dup 2)
435 : (const_int 3))
436 : (match_operand:SI 3 "const_4_or_8_to_11_operand")]
437 : UNSPEC_EMBEDDED_ROUNDING))])
438 :
439 : (define_subst_attr "round_saeonly_scalar_name" "round_saeonly_scalar" "" "_round")
440 : (define_subst_attr "round_saeonly_scalar_mask_operand3" "mask_scalar" "%r3" "%r5")
441 : (define_subst_attr "round_saeonly_scalar_mask_operand4" "mask_scalar" "%r4" "%r6")
442 : (define_subst_attr "round_saeonly_scalar_mask_op3" "round_saeonly_scalar" "" "<round_saeonly_scalar_mask_operand3>")
443 : (define_subst_attr "round_saeonly_scalar_mask_op4" "round_saeonly_scalar" "" "<round_saeonly_scalar_mask_operand4>")
444 : (define_subst_attr "round_saeonly_scalar_constraint" "round_saeonly_scalar" "vm" "v")
445 : (define_subst_attr "round_saeonly_scalar_prefix" "round_saeonly_scalar" "vex" "evex")
446 : (define_subst_attr "round_saeonly_scalar_nimm_predicate" "round_saeonly_scalar" "nonimmediate_operand" "register_operand")
447 : (define_subst_attr "round_saeonly_scalar_mask_arg3" "round_saeonly_scalar" "" ", operands[<mask_scalar_expand_op3>]")
448 :
449 : (define_subst "round_saeonly_scalar"
450 : [(set (match_operand:SUBST_V 0)
451 : (vec_merge:SUBST_V
452 : (match_operand:SUBST_V 1)
453 : (match_operand:SUBST_V 2)
454 : (const_int 1)))]
455 1306 : "TARGET_AVX512F"
456 : [(set (match_dup 0)
457 : (unspec:SUBST_V [
458 : (vec_merge:SUBST_V
459 : (match_dup 1)
460 : (match_dup 2)
461 : (const_int 1))
462 : (match_operand:SI 3 "const48_operand")]
463 : UNSPEC_EMBEDDED_ROUNDING))])
464 :
465 : (define_subst_attr "round_zext_name" "round_zext" "_zext" "_round_zext")
466 : (define_subst_attr "round_zext_constraint" "round_zext" "vm" "v")
467 : (define_subst_attr "round_zext_constraint2" "round_zext" "m" "v")
468 : (define_subst_attr "round_zext_nimm_predicate" "round_zext" "vector_operand" "register_operand")
469 : (define_subst_attr "round_zext_nimm_scalar_predicate" "round_zext" "nonimmediate_operand" "register_operand")
470 : (define_subst_attr "round_zext_op2" "round_zext" "" "%R2")
471 :
472 : (define_subst "round_zext"
473 : [(set (match_operand:DI 0)
474 : (zero_extend:DI
475 : (match_operand:SI 1)))]
476 34 : "TARGET_64BIT && TARGET_AVX512F"
477 : [(set (match_dup 0)
478 : (zero_extend:DI
479 : (unspec:SI
480 6 : [(match_dup 1)
481 : (match_operand:SI 2 "const_4_or_8_to_11_operand")]
482 : UNSPEC_EMBEDDED_ROUNDING)))
483 6 : ])
484 :
485 : (define_subst_attr "round_saeonly_zext_name" "round_saeonly_zext" "_zext" "_round_zext")
486 : (define_subst_attr "round_saeonly_zext_constraint" "round_saeonly_zext" "vm" "v")
487 : (define_subst_attr "round_saeonly_zext_constraint2" "round_saeonly_zext" "m" "v")
488 : (define_subst_attr "round_saeonly_zext_nimm_scalar_predicate" "round_saeonly_zext" "nonimmediate_operand" "register_operand")
489 : (define_subst_attr "round_saeonly_zext_op2" "round_saeonly_zext" "" "%r2")
490 :
491 : (define_subst "round_saeonly_zext"
492 : [(set (match_operand:DI 0)
493 : (zero_extend:DI
494 : (match_operand:SI 1)))]
495 8 : "TARGET_64BIT && TARGET_AVX512F"
496 : [(set (match_dup 0)
497 : (zero_extend:DI
498 : (unspec:SI
499 : [(match_dup 1)
500 : (match_operand:SI 2 "const48_operand")]
501 : UNSPEC_EMBEDDED_ROUNDING)))
502 : ])
|