1 ;; Machine description for AArch64 architecture.
2 ;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
3 ;; Contributed by ARM Ltd.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 3, or (at your option)
12 ;; GCC is distributed in the hope that it will be useful, but
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ;; General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
21 ;; -------------------------------------------------------------------
23 ;; -------------------------------------------------------------------
25 ;; Condition-code iterators.
26 (define_mode_iterator CC_ONLY [CC])
27 (define_mode_iterator CCFP_CCFPE [CCFP CCFPE])
29 ;; Iterator for General Purpose Integer registers (32- and 64-bit modes)
30 (define_mode_iterator GPI [SI DI])
32 ;; Iterator for HI, SI, DI, some instructions can only work on these modes.
33 (define_mode_iterator GPI_I16 [(HI "TARGET_FP_F16INST") SI DI])
35 ;; "Iterator" for just TI -- features like @pattern only work with iterators.
36 (define_mode_iterator JUST_TI [TI])
38 ;; Iterator for QI and HI modes
39 (define_mode_iterator SHORT [QI HI])
41 ;; Iterators for single modes, for "@" patterns.
42 (define_mode_iterator SI_ONLY [SI])
43 (define_mode_iterator DI_ONLY [DI])
44 (define_mode_iterator V8HF_ONLY [V8HF])
45 (define_mode_iterator V4SF_ONLY [V4SF])
47 ;; Iterator for all integer modes (up to 64-bit)
48 (define_mode_iterator ALLI [QI HI SI DI])
50 ;; Iterator for all integer modes (up to 128-bit)
51 (define_mode_iterator ALLI_TI [QI HI SI DI TI])
53 ;; Iterator for all integer modes that can be extended (up to 64-bit)
54 (define_mode_iterator ALLX [QI HI SI])
56 ;; Iterator for General Purpose Floating-point registers (32- and 64-bit modes)
57 (define_mode_iterator GPF [SF DF])
59 ;; Iterator for all scalar floating point modes (HF, SF, DF)
60 (define_mode_iterator GPF_F16 [(HF "TARGET_FP_F16INST") SF DF])
62 ;; Iterator for all scalar floating point modes (HF, SF, DF)
63 (define_mode_iterator GPF_HF [HF SF DF])
65 ;; Iterator for all 16-bit scalar floating point modes (HF, BF)
66 (define_mode_iterator HFBF [HF BF])
68 ;; Iterator for all scalar floating point modes suitable for moving, including
69 ;; special BF type and decimal floating point types (HF, SF, DF, TF, BF,
71 (define_mode_iterator GPF_TF_F16_MOV [HF BF SF DF TF SD DD TD])
73 ;; Iterator for scalar 32bit fp modes (SF, SD)
74 (define_mode_iterator SFD [SD SF])
76 ;; Iterator for scalar 64bit fp modes (DF, DD)
77 (define_mode_iterator DFD [DD DF])
79 ;; Iterator for scalar 128bit fp modes (TF, TD)
80 (define_mode_iterator TFD [TD TF])
82 ;; Double vector modes.
83 (define_mode_iterator VDF [V2SF V4HF])
85 ;; Iterator for all scalar floating point modes (SF, DF, TF, SD, DD, and TD)
86 (define_mode_iterator GPF_TF [SF DF TF SD DD TD])
88 ;; Integer Advanced SIMD modes.
89 (define_mode_iterator VDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI])
91 ;; Advanced SIMD and scalar, 64 & 128-bit container, all integer modes.
92 (define_mode_iterator VSDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI QI HI SI DI])
94 ;; Advanced SIMD and scalar, 64 & 128-bit container: all Advanced SIMD
95 ;; integer modes; 64-bit scalar integer mode.
96 (define_mode_iterator VSDQ_I_DI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI DI])
98 ;; Advanced SIMD and scalar, 64 & 128-bit container; 8 and 16-bit scalar
100 (define_mode_iterator VSDQ_I_QI_HI [VDQ_I HI QI])
102 ;; Double vector modes.
103 (define_mode_iterator VD [V8QI V4HI V4HF V2SI V2SF V4BF])
105 ;; Double vector modes suitable for moving. Includes BFmode.
106 (define_mode_iterator VDMOV [V8QI V4HI V4HF V4BF V2SI V2SF])
108 ;; 64-bit modes for operations that implicitly clear the top bits of a Q reg.
109 (define_mode_iterator VDZ [V8QI V4HI V4HF V4BF V2SI V2SF DI DF])
111 ;; All modes stored in registers d0-d31.
112 (define_mode_iterator DREG [V8QI V4HI V4HF V2SI V2SF DF])
114 ;; Copy of the above.
115 (define_mode_iterator DREG2 [DREG])
117 ;; All modes suitable to store/load pair (2 elements) using STP/LDP.
118 (define_mode_iterator VP_2E [V2SI V2SF V2DI V2DF])
120 ;; Advanced SIMD, 64-bit container, all integer modes.
121 (define_mode_iterator VD_BHSI [V8QI V4HI V2SI])
123 ;; 128 and 64-bit container; 8, 16, 32-bit vector integer modes
124 (define_mode_iterator VDQ_BHSI [V8QI V16QI V4HI V8HI V2SI V4SI])
126 ;; Quad vector modes.
127 (define_mode_iterator VQ [V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF])
129 ;; Copy of the above.
130 (define_mode_iterator VQ2 [VQ])
132 ;; Quad vector modes suitable for moving. Includes BFmode.
133 (define_mode_iterator VQMOV [V16QI V8HI V4SI V2DI V8HF V8BF V4SF V2DF])
135 ;; VQMOV without 2-element modes.
136 (define_mode_iterator VQMOV_NO2E [V16QI V8HI V4SI V8HF V8BF V4SF])
138 ;; Double integer vector modes.
139 (define_mode_iterator VD_I [V8QI V4HI V2SI DI])
141 ;; Quad integer vector modes.
142 (define_mode_iterator VQ_I [V16QI V8HI V4SI V2DI])
144 ;; VQ without 2 element modes.
145 (define_mode_iterator VQ_NO2E [V16QI V8HI V4SI V8HF V4SF V8BF])
147 ;; SVE modes without 2 and 4 element modes.
148 (define_mode_iterator SVE_NO4E [VNx16QI VNx8QI VNx8HI VNx8HF VNx8BF])
150 ;; SVE modes without 2 element modes.
151 (define_mode_iterator SVE_NO2E [SVE_NO4E VNx4QI VNx4HI VNx4HF VNx4BF VNx4SI
154 ;; 2 element quad vector modes.
155 (define_mode_iterator VQ_2E [V2DI V2DF])
157 ;; BFmode vector modes.
158 (define_mode_iterator VBF [V4BF V8BF])
160 ;; This mode iterator allows :P to be used for patterns that operate on
161 ;; addresses in different modes. In LP64, only DI will match, while in
162 ;; ILP32, either can match.
163 (define_mode_iterator P [(SI "ptr_mode == SImode || Pmode == SImode")
164 (DI "ptr_mode == DImode || Pmode == DImode")])
166 ;; This mode iterator allows :PTR to be used for patterns that operate on
167 ;; pointer-sized quantities. Exactly one of the two alternatives will match.
168 (define_mode_iterator PTR [(SI "ptr_mode == SImode") (DI "ptr_mode == DImode")])
170 ;; Advanced SIMD Float modes suitable for moving, loading and storing.
171 (define_mode_iterator VDQF_F16 [V4HF V8HF V2SF V4SF V2DF
174 ;; Advanced SIMD Float modes.
175 (define_mode_iterator VDQF [V2SF V4SF V2DF])
176 (define_mode_iterator VHSDF [(V4HF "TARGET_SIMD_F16INST")
177 (V8HF "TARGET_SIMD_F16INST")
180 ;; Advanced SIMD Float modes, and DF.
181 (define_mode_iterator VDQF_DF [V2SF V4SF V2DF DF])
182 (define_mode_iterator VHSDF_DF [(V4HF "TARGET_SIMD_F16INST")
183 (V8HF "TARGET_SIMD_F16INST")
185 (define_mode_iterator VHSDF_HSDF [(V4HF "TARGET_SIMD_F16INST")
186 (V8HF "TARGET_SIMD_F16INST")
188 (HF "TARGET_SIMD_F16INST")
191 ;; Scalar and vetor modes for SF, DF.
192 (define_mode_iterator VSFDF [V2SF V4SF V2DF DF SF])
194 ;; Advanced SIMD single Float modes.
195 (define_mode_iterator VDQSF [V2SF V4SF])
197 ;; Quad vector float modes with half/bfloat elements.
198 (define_mode_iterator VQ_BHF [V8HF V8BF])
200 ;; Quad vector Float modes with half/single elements.
201 (define_mode_iterator VQ_HSF [V8HF V4SF])
203 (define_mode_iterator VDQ_HSF_FDOT [(V4HF "TARGET_FP8DOT2")
204 (V8HF "TARGET_FP8DOT2")
205 (V2SF "TARGET_FP8DOT4")
206 (V4SF "TARGET_FP8DOT4")])
208 ;; Modes suitable to use as the return type of a vcond expression.
209 (define_mode_iterator VDQF_COND [V2SF V2SI V4SF V4SI V2DF V2DI])
211 ;; All scalar and Advanced SIMD Float modes.
212 (define_mode_iterator VALLF [V2SF V4SF V2DF SF DF])
214 ;; Advanced SIMD Float modes with 2 elements.
215 (define_mode_iterator V2F [V2SF V2DF])
217 ;; All Advanced SIMD modes on which we support any arithmetic operations.
218 (define_mode_iterator VALL [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF])
220 ;; All Advanced SIMD modes suitable for moving, loading, and storing.
221 (define_mode_iterator VALL_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
222 V4HF V8HF V4BF V8BF V2SF V4SF V2DF])
224 ;; The VALL_F16 modes except the 128-bit 2-element ones.
225 (define_mode_iterator VALL_F16_NO_V2Q [V8QI V16QI V4HI V8HI V2SI V4SI
226 V4HF V8HF V2SF V4SF])
228 ;; All Advanced SIMD modes barring HF modes, plus DI.
229 (define_mode_iterator VALLDI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF DI])
231 ;; All Advanced SIMD modes and DI.
232 (define_mode_iterator VALLDI_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
233 V4HF V8HF V4BF V8BF V2SF V4SF V2DF DI])
235 ;; All Advanced SIMD modes, plus DI and DF.
236 (define_mode_iterator VALLDIF [V8QI V16QI V4HI V8HI V2SI V4SI V4BF V8BF
237 V2DI V4HF V8HF V2SF V4SF V2DF DI DF])
239 ;; All Advanced SIMD polynomial modes and DI.
240 (define_mode_iterator VALLP [V8QI V16QI V4HI V8HI V2DI DI])
242 ;; All Advanced SIMD polynomial modes.
243 (define_mode_iterator VALLP_NO_DI [V8QI V16QI V4HI V8HI V2DI])
245 ;; Advanced SIMD modes for Integer reduction across lanes.
246 (define_mode_iterator VDQV [V8QI V16QI V4HI V8HI V4SI V2DI])
248 ;; Advanced SIMD modes (except V2DI) for Integer reduction across lanes.
249 (define_mode_iterator VDQV_S [V8QI V16QI V4HI V8HI V4SI])
251 ;; Advanced SIMD modes for Integer reduction across lanes (zero/sign extended).
252 (define_mode_iterator VDQV_E [V8QI V16QI V4HI V8HI])
254 ;; Advanced SIMD modes for Integer widening reduction across lanes.
255 (define_mode_iterator VDQV_L [V8QI V16QI V4HI V8HI V4SI V2SI])
257 ;; All double integer narrow-able modes.
258 (define_mode_iterator VDN [V4HI V2SI DI])
260 ;; All quad integer narrow-able modes.
261 (define_mode_iterator VQN [V8HI V4SI V2DI])
263 ;; Advanced SIMD and scalar 128-bit container: narrowable 16, 32, 64-bit
265 (define_mode_iterator VSQN_HSDI [V8HI V4SI V2DI HI SI DI])
267 ;; All quad integer widen-able modes.
268 (define_mode_iterator VQW [V16QI V8HI V4SI])
270 ;; Double vector modes for combines.
271 (define_mode_iterator VDC [V8QI V4HI V4BF V4HF V2SI V2SF DI DF])
273 ;; VDC plus SI and SF.
274 (define_mode_iterator VDCSIF [V8QI V4HI V4BF V4HF V2SI V2SF SI SF DI DF])
276 ;; Polynomial modes for vector combines.
277 (define_mode_iterator VDC_P [V8QI V4HI DI])
279 ;; Advanced SIMD modes except double int.
280 (define_mode_iterator VDQIF [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF V2DF])
281 (define_mode_iterator VDQIF_F16 [V8QI V16QI V4HI V8HI V2SI V4SI
282 V4HF V8HF V2SF V4SF V2DF])
284 ;; Advanced SIMD modes for S type.
285 (define_mode_iterator VDQ_SI [V2SI V4SI])
287 ;; Advanced SIMD modes for S and D.
288 (define_mode_iterator VDQ_SDI [V2SI V4SI V2DI])
290 ;; Advanced SIMD modes for H, S and D.
291 (define_mode_iterator VDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
292 (V8HI "TARGET_SIMD_F16INST")
295 ;; Scalar and Advanced SIMD modes for S and D.
296 (define_mode_iterator VSDQ_SDI [V2SI V4SI V2DI SI DI])
298 ;; Scalar and Advanced SIMD modes for S and D, Advanced SIMD modes for H.
299 (define_mode_iterator VSDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
300 (V8HI "TARGET_SIMD_F16INST")
302 (HI "TARGET_SIMD_F16INST")
305 ;; Advanced SIMD modes for Q and H types.
306 (define_mode_iterator VDQQH [V8QI V16QI V4HI V8HI])
308 ;; Advanced SIMD modes for H and S types.
309 (define_mode_iterator VDQHS [V4HI V8HI V2SI V4SI])
311 ;; Advanced SIMD modes for H, S and D types.
312 (define_mode_iterator VDQHSD [V4HI V8HI V2SI V4SI V2DI])
314 (define_mode_iterator VDQHSD_V1DI [VDQHSD V1DI])
316 ;; Advanced SIMD and scalar integer modes for H and S.
317 (define_mode_iterator VSDQ_HSI [V4HI V8HI V2SI V4SI HI SI])
319 ;; Advanced SIMD and scalar 64-bit container: 16, 32-bit integer modes.
320 (define_mode_iterator VSD_HSI [V4HI V2SI HI SI])
322 ;; Advanced SIMD 64-bit container: 16, 32-bit integer modes.
323 (define_mode_iterator VD_HSI [V4HI V2SI])
325 ;; Scalar 64-bit container: 16, 32-bit integer modes
326 (define_mode_iterator SD_HSI [HI SI])
328 ;; Scalar 64-bit container: 16-bit, 32-bit and 64-bit integer modes.
329 (define_mode_iterator SD_HSDI [HI SI DI])
331 ;; Advanced SIMD 64-bit container: 16, 32-bit integer modes.
332 (define_mode_iterator VQ_HSI [V8HI V4SI])
335 (define_mode_iterator VB [V8QI V16QI])
337 ;; 1 and 2 lane DI and DF modes.
338 (define_mode_iterator V12DIF [V1DI V1DF V2DI V2DF])
340 ;; 1 and 2 lane DI mode.
341 (define_mode_iterator V12DI [V1DI V2DI])
343 ;; 2 and 4 lane SI modes.
344 (define_mode_iterator VS [V2SI V4SI])
346 (define_mode_iterator TX [TI TF TD])
348 ;; Duplicate of the above
349 (define_mode_iterator TX2 [TX])
351 (define_mode_iterator VTX [TI TF TD V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF])
353 ;; Advanced SIMD opaque structure modes.
354 (define_mode_iterator VSTRUCT [OI CI XI])
356 ;; Advanced SIMD 64-bit 2-vector structure modes.
357 (define_mode_iterator VSTRUCT_2D [V2x8QI V2x4HI V2x2SI V2x1DI
358 V2x4HF V2x2SF V2x1DF V2x4BF])
360 ;; Advanced SIMD 64-bit 3-vector structure modes.
361 (define_mode_iterator VSTRUCT_3D [V3x8QI V3x4HI V3x2SI V3x1DI
362 V3x4HF V3x2SF V3x1DF V3x4BF])
364 ;; Advanced SIMD 64-bit 4-vector structure modes.
365 (define_mode_iterator VSTRUCT_4D [V4x8QI V4x4HI V4x2SI V4x1DI
366 V4x4HF V4x2SF V4x1DF V4x4BF])
368 ;; Advanced SIMD 64-bit vector structure modes.
369 (define_mode_iterator VSTRUCT_D [VSTRUCT_2D VSTRUCT_3D VSTRUCT_4D])
371 ;; Advanced SIMD 64-bit 2-vector structure modes minus V2x1DI and V2x1DF.
372 (define_mode_iterator VSTRUCT_2DNX [V2x8QI V2x4HI V2x2SI V2x4HF
375 ;; Advanced SIMD 64-bit 3-vector structure modes minus V3x1DI and V3x1DF.
376 (define_mode_iterator VSTRUCT_3DNX [V3x8QI V3x4HI V3x2SI V3x4HF
379 ;; Advanced SIMD 64-bit 4-vector structure modes minus V4x1DI and V4x1DF.
380 (define_mode_iterator VSTRUCT_4DNX [V4x8QI V4x4HI V4x2SI V4x4HF
383 ;; Advanced SIMD 64-bit structure modes with 64-bit elements.
384 (define_mode_iterator VSTRUCT_DX [V2x1DI V2x1DF V3x1DI V3x1DF V4x1DI V4x1DF])
386 ;; Advanced SIMD 64-bit 2-vector structure modes with 64-bit elements.
387 (define_mode_iterator VSTRUCT_2DX [V2x1DI V2x1DF])
389 ;; Advanced SIMD 64-bit 3-vector structure modes with 64-bit elements.
390 (define_mode_iterator VSTRUCT_3DX [V3x1DI V3x1DF])
392 ;; Advanced SIMD 64-bit 4-vector structure modes with 64-bit elements.
393 (define_mode_iterator VSTRUCT_4DX [V4x1DI V4x1DF])
395 ;; Advanced SIMD 128-bit 2-vector structure modes.
396 (define_mode_iterator VSTRUCT_2Q [V2x16QI V2x8HI V2x4SI V2x2DI
397 V2x8HF V2x4SF V2x2DF V2x8BF])
399 ;; Advanced SIMD 128-bit 3-vector structure modes.
400 (define_mode_iterator VSTRUCT_3Q [V3x16QI V3x8HI V3x4SI V3x2DI
401 V3x8HF V3x4SF V3x2DF V3x8BF])
403 ;; Advanced SIMD 128-bit 4-vector structure modes.
404 (define_mode_iterator VSTRUCT_4Q [V4x16QI V4x8HI V4x4SI V4x2DI
405 V4x8HF V4x4SF V4x2DF V4x8BF])
407 ;; Advanced SIMD 128-bit vector structure modes.
408 (define_mode_iterator VSTRUCT_Q [VSTRUCT_2Q VSTRUCT_3Q VSTRUCT_4Q])
410 ;; Advanced SIMD 2-vector structure modes.
411 (define_mode_iterator VSTRUCT_2QD [VSTRUCT_2D VSTRUCT_2Q])
413 ;; Advanced SIMD 3-vector structure modes.
414 (define_mode_iterator VSTRUCT_3QD [VSTRUCT_3D VSTRUCT_3Q])
416 ;; Advanced SIMD 4-vector structure modes.
417 (define_mode_iterator VSTRUCT_4QD [VSTRUCT_4D VSTRUCT_4Q])
419 ;; Advanced SIMD vector structure modes.
420 (define_mode_iterator VSTRUCT_QD [VSTRUCT_D VSTRUCT_Q])
422 ;; Double scalar modes
423 (define_mode_iterator DX [DI DF DD])
425 ;; Duplicate of the above
426 (define_mode_iterator DX2 [DX])
428 ;; Single scalar modes
429 (define_mode_iterator SX [SI SF])
431 ;; Duplicate of the above
432 (define_mode_iterator SX2 [SX])
434 ;; Single and double integer and float modes
435 (define_mode_iterator DSX [DF DI SF SI])
438 ;; Modes available for Advanced SIMD <f>mul operations.
439 (define_mode_iterator VMUL [V4HI V8HI V2SI V4SI
440 (V4HF "TARGET_SIMD_F16INST")
441 (V8HF "TARGET_SIMD_F16INST")
444 ;; The subset of VMUL for which VCOND is a vector mode.
445 (define_mode_iterator VMULD [V4HI V8HI V2SI V4SI
446 (V4HF "TARGET_SIMD_F16INST")
447 (V8HF "TARGET_SIMD_F16INST")
450 ;; Modes available for Advanced SIMD lut operations.
451 (define_mode_iterator VLUT [V8QI V16QI V4HI V4HF V4BF])
452 (define_mode_iterator VLUTx2 [V2x8HI V2x8HF V2x8BF])
454 ;; Modes available for Advanced SIMD FP8 conversion operations.
455 (define_mode_iterator VCVTFPM [V4HF V8HF V4SF])
457 ;; Iterators for single modes, for "@" patterns.
458 (define_mode_iterator VNx16QI_ONLY [VNx16QI])
459 (define_mode_iterator VNx16SI_ONLY [VNx16SI])
460 (define_mode_iterator VNx8HI_ONLY [VNx8HI])
461 (define_mode_iterator VNx8HF_ONLY [VNx8HF])
462 (define_mode_iterator VNx8BF_ONLY [VNx8BF])
463 (define_mode_iterator VNx8SI_ONLY [VNx8SI])
464 (define_mode_iterator VNx8SF_ONLY [VNx8SF])
465 (define_mode_iterator VNx8DI_ONLY [VNx8DI])
466 (define_mode_iterator VNx4SI_ONLY [VNx4SI])
467 (define_mode_iterator VNx4SF_ONLY [VNx4SF])
468 (define_mode_iterator VNx2DI_ONLY [VNx2DI])
469 (define_mode_iterator VNx2DF_ONLY [VNx2DF])
470 (define_mode_iterator VNx1TI_ONLY [VNx1TI])
472 ;; All fully-packed SVE vector modes.
473 (define_mode_iterator SVE_FULL [VNx16QI VNx8HI VNx4SI VNx2DI
474 VNx8BF VNx8HF VNx4SF VNx2DF])
476 ;; All fully-packed SVE integer vector modes.
477 (define_mode_iterator SVE_FULL_I [VNx16QI VNx8HI VNx4SI VNx2DI])
479 ;; All fully-packed SVE integer and Advanced SIMD integer modes.
480 (define_mode_iterator SVE_ASIMD_FULL_I [SVE_FULL_I VDQ_I])
482 ;; All fully-packed SVE floating-point vector modes.
483 (define_mode_iterator SVE_FULL_F [VNx8HF VNx4SF VNx2DF])
485 ;; Fully-packed SVE floating-point vector modes and their scalar equivalents.
486 (define_mode_iterator SVE_FULL_F_SCALAR [SVE_FULL_F GPF_HF])
488 (define_mode_iterator SVE_FULL_F_BF [(VNx8BF "TARGET_SSVE_B16B16") SVE_FULL_F])
490 ;; Modes for which (B)FCLAMP is supported.
491 (define_mode_iterator SVE_CLAMP_F [(VNx8BF "TARGET_SSVE_B16B16")
492 (VNx8HF "TARGET_SVE2p1_OR_SME2")
493 (VNx4SF "TARGET_SVE2p1_OR_SME2")
494 (VNx2DF "TARGET_SVE2p1_OR_SME2")])
496 ;; Fully-packed SVE integer vector modes that have 8-bit or 16-bit elements.
497 (define_mode_iterator SVE_FULL_BHI [VNx16QI VNx8HI])
499 ;; Fully-packed SVE integer vector modes that have 8-bit, 16-bit or 32-bit
501 (define_mode_iterator SVE_FULL_BHSI [VNx16QI VNx8HI VNx4SI])
503 ;; Pairs of the above.
504 (define_mode_iterator SVE_FULL_BHSIx2 [VNx32QI VNx16HI VNx8SI])
506 ;; Fully-packed SVE vector modes that have 16-bit float elements.
507 (define_mode_iterator SVE_FULL_HF [VNx8BF VNx8HF])
509 ;; Pairs of the above.
510 (define_mode_iterator SVE_FULL_HFx2 [VNx16BF VNx16HF])
512 ;; Fully-packed SVE vector modes that have 16-bit, 32-bit or 64-bit elements.
513 (define_mode_iterator SVE_FULL_HSD [VNx8HI VNx4SI VNx2DI
514 VNx8BF VNx8HF VNx4SF VNx2DF])
516 ;; Fully-packed SVE integer vector modes that have 16-bit, 32-bit or 64-bit
518 (define_mode_iterator SVE_FULL_HSDI [VNx8HI VNx4SI VNx2DI])
520 ;; Fully-packed SVE integer vector modes that have 16-bit, 32-bit or 64-bit
521 ;; elements and Advanced SIMD Fully-packed 64-bit elements.
522 (define_mode_iterator SVE_FULL_HSDI_SIMD_DI [SVE_FULL_HSDI V2DI])
524 ;; Fully-packed SVE integer vector modes that have 16-bit or 32-bit
526 (define_mode_iterator SVE_FULL_HSI [VNx8HI VNx4SI])
528 ;; Fully-packed SVE floating-point vector modes that have 16-bit or 32-bit
530 (define_mode_iterator SVE_FULL_HSF [VNx8HF VNx4SF])
532 ;; Fully-packed SVE integer vector modes that have 16-bit or 64-bit elements.
533 (define_mode_iterator SVE_FULL_HDI [VNx8HI VNx2DI])
535 ;; Fully-packed SVE vector modes that have 32-bit or 64-bit elements.
536 (define_mode_iterator SVE_FULL_SD [VNx4SI VNx2DI VNx4SF VNx2DF])
538 ;; Fully-packed SVE integer vector modes that have 32-bit or 64-bit elements.
539 (define_mode_iterator SVE_FULL_SDI [VNx4SI VNx2DI])
541 ;; Fully-packed SVE and Advanced SIMD integer vector modes that have 32-bit or
543 (define_mode_iterator SVE_FULL_SDI_SIMD [SVE_FULL_SDI V4SI V2DI])
545 ;; 2x and 4x tuples of the above, excluding 2x DI.
546 (define_mode_iterator SVE_FULL_SIx2_SDIx4 [VNx8SI VNx16SI VNx8DI])
548 ;; Fully-packed SVE floating-point vector modes that have 32-bit or 64-bit
550 (define_mode_iterator SVE_FULL_SDF [VNx4SF VNx2DF])
552 ;; Same, but with the appropriate conditions for FMMLA support.
553 (define_mode_iterator SVE_MATMULF [(VNx4SF "TARGET_SVE_F32MM")
554 (VNx2DF "TARGET_SVE_F64MM")])
556 ;; Fully-packed SVE vector modes that have 32-bit or smaller elements.
557 (define_mode_iterator SVE_FULL_BHS [VNx16QI VNx8HI VNx4SI
558 VNx8BF VNx8HF VNx4SF])
560 ;; Fully-packed SVE vector byte modes that have 16-bit or smaller elements.
561 (define_mode_iterator SVE_FULL_BH [VNx16QI VNx8HI VNx8HF VNx8BF])
563 ;; Pairs of fully-packed SVE vector modes (half word only)
564 (define_mode_iterator SVE_FULL_Hx2 [VNx16HI VNx16HF VNx16BF])
566 ;; Fully-packed SVE vector modes that have 32-bit elements.
567 (define_mode_iterator SVE_FULL_S [VNx4SI VNx4SF])
569 ;; Fully-packed SVE vector modes that have 64-bit elements.
570 (define_mode_iterator SVE_FULL_D [VNx2DI VNx2DF])
572 ;; All partial SVE integer modes.
573 (define_mode_iterator SVE_PARTIAL_I [VNx8QI VNx4QI VNx2QI
577 ;; All SVE integer vector modes.
578 (define_mode_iterator SVE_I [VNx16QI VNx8QI VNx4QI VNx2QI
583 ;; All SVE floating-point vector modes.
584 (define_mode_iterator SVE_F [VNx8HF VNx4HF VNx2HF
589 ;; All SVE vector modes.
590 (define_mode_iterator SVE_ALL [SVE_I SVE_F])
592 ;; All SVE 2-vector modes.
593 (define_mode_iterator SVE_FULLx2 [VNx32QI VNx16HI VNx8SI VNx4DI
594 VNx16BF VNx16HF VNx8SF VNx4DF])
596 ;; All SVE 3-vector modes.
597 (define_mode_iterator SVE_FULLx3 [VNx48QI VNx24HI VNx12SI VNx6DI
598 VNx24BF VNx24HF VNx12SF VNx6DF])
600 ;; All SVE 4-vector modes.
601 (define_mode_iterator SVE_FULLx4 [VNx64QI VNx32HI VNx16SI VNx8DI
602 VNx32BF VNx32HF VNx16SF VNx8DF])
604 (define_mode_iterator SVE_FULLx24 [SVE_FULLx2 SVE_FULLx4])
606 ;; All SVE vector structure modes.
607 (define_mode_iterator SVE_STRUCT [SVE_FULLx2 SVE_FULLx3 SVE_FULLx4])
609 (define_mode_iterator SVE_STRUCT_BI [VNx32BI VNx64BI])
611 ;; All SVE vector and structure modes.
612 (define_mode_iterator SVE_ALL_STRUCT [SVE_ALL SVE_STRUCT])
614 ;; All SVE integer vector modes and Advanced SIMD 64-bit vector
616 (define_mode_iterator SVE_I_SIMD_DI [SVE_I V2DI])
618 ;; All SVE and Advanced SIMD integer vector modes.
619 (define_mode_iterator SVE_VDQ_I [SVE_I VDQ_I V1DI])
621 ;; SVE integer vector modes whose elements are 16 bits or wider.
622 (define_mode_iterator SVE_HSDI [VNx8HI VNx4HI VNx2HI
626 (define_mode_iterator SVE_DIx24 [VNx4DI VNx8DI])
628 ;; SVE modes with 2 or 4 elements.
629 (define_mode_iterator SVE_24 [VNx2QI VNx2HI VNx2HF VNx2BF VNx2SI VNx2SF
631 VNx4QI VNx4HI VNx4HF VNx4BF VNx4SI VNx4SF])
633 ;; SVE integer modes with 2 or 4 elements.
634 (define_mode_iterator SVE_24I [VNx2QI VNx2HI VNx2SI VNx2DI
635 VNx4QI VNx4HI VNx4SI])
637 ;; SVE modes with 2 elements.
638 (define_mode_iterator SVE_2 [VNx2QI VNx2HI VNx2HF VNx2BF
639 VNx2SI VNx2SF VNx2DI VNx2DF])
641 ;; SVE integer modes with 2 elements, excluding the widest element.
642 (define_mode_iterator SVE_2BHSI [VNx2QI VNx2HI VNx2SI])
644 ;; SVE integer modes with 2 elements, excluding the narrowest element.
645 (define_mode_iterator SVE_2HSDI [VNx2HI VNx2SI VNx2DI])
647 ;; SVE modes with 4 elements.
648 (define_mode_iterator SVE_4 [VNx4QI VNx4HI VNx4HF VNx4BF VNx4SI VNx4SF])
650 ;; SVE integer modes with 4 elements, excluding the widest element.
651 (define_mode_iterator SVE_4BHI [VNx4QI VNx4HI])
653 ;; SVE integer modes with 4 elements, excluding the narrowest element.
654 (define_mode_iterator SVE_4HSI [VNx4HI VNx4SI])
656 ;; SVE integer modes that can form the input to an SVE2 PMULL[BT] instruction.
657 (define_mode_iterator SVE2_PMULL_PAIR_I [VNx16QI VNx4SI
658 (VNx2DI "TARGET_SVE2_AES")])
660 ;; Modes involved in extending or truncating SVE data, for 8 elements per
662 (define_mode_iterator VNx8_NARROW [VNx8QI])
663 (define_mode_iterator VNx8_WIDE [VNx8HI])
665 ;; ...same for 4 elements per 128-bit block.
666 (define_mode_iterator VNx4_NARROW [VNx4QI VNx4HI])
667 (define_mode_iterator VNx4_WIDE [VNx4SI])
669 ;; ...same for 2 elements per 128-bit block.
670 (define_mode_iterator VNx2_NARROW [VNx2QI VNx2HI VNx2SI])
671 (define_mode_iterator VNx2_WIDE [VNx2DI])
673 ;; All SVE predicate modes.
674 (define_mode_iterator PRED_ALL [VNx16BI VNx8BI VNx4BI VNx2BI])
676 ;; SVE predicate modes that control 8-bit, 16-bit or 32-bit elements.
677 (define_mode_iterator PRED_BHS [VNx16BI VNx8BI VNx4BI])
679 ;; SVE predicate modes that control 16-bit, 32-bit or 64-bit elements.
680 (define_mode_iterator PRED_HSD [VNx8BI VNx4BI VNx2BI])
682 ;; Bfloat16 modes to which V4SF can be converted
683 (define_mode_iterator V4SF_TO_BF [V4BF V8BF])
685 (define_mode_iterator SVE_BHSx24 [VNx32QI VNx16HI VNx8SI
686 VNx16BF VNx16HF VNx8SF
687 VNx64QI VNx32HI VNx16SI
688 VNx32BF VNx32HF VNx16SF])
690 (define_mode_iterator SVE_Ix24 [VNx32QI VNx16HI VNx8SI VNx4DI
691 VNx64QI VNx32HI VNx16SI VNx8DI])
693 (define_mode_iterator SVE_Fx24 [(VNx16BF "TARGET_SSVE_B16B16")
694 (VNx32BF "TARGET_SSVE_B16B16")
695 VNx16HF VNx8SF VNx4DF
696 VNx32HF VNx16SF VNx8DF])
698 (define_mode_iterator SVE_SFx24 [VNx8SF VNx16SF])
700 ;; The modes used to represent different ZA access sizes.
701 (define_mode_iterator SME_ZA_I [VNx16QI VNx8HI VNx4SI VNx2DI VNx1TI])
702 (define_mode_iterator SME_ZA_SDI [VNx4SI (VNx2DI "TARGET_SME_I16I64")])
704 (define_mode_iterator SME_ZA_BIx24 [VNx32QI VNx64QI])
706 (define_mode_iterator SME_ZA_BHIx124 [VNx16QI VNx32QI VNx64QI
707 VNx8HI VNx16HI VNx32HI])
709 (define_mode_iterator SME_ZA_BHIx24 [VNx32QI VNx64QI VNx16HI VNx32HI])
711 (define_mode_iterator SME_ZA_HFx124 [VNx8BF VNx16BF VNx32BF
712 VNx8HF VNx16HF VNx32HF])
714 (define_mode_iterator SME_ZA_HFx24 [VNx16BF VNx32BF VNx16HF VNx32HF])
716 (define_mode_iterator SME_ZA_HIx124 [VNx8HI VNx16HI VNx32HI])
718 (define_mode_iterator SME_ZA_HIx24 [VNx16HI VNx32HI])
720 (define_mode_iterator SME_ZA_SDIx24 [VNx8SI (VNx4DI "TARGET_SME_I16I64")
721 VNx16SI (VNx8DI "TARGET_SME_I16I64")])
723 (define_mode_iterator SME_ZA_HSDFx24 [VNx8SF VNx16SF
724 (VNx4DF "TARGET_SME_F64F64")
725 (VNx8DF "TARGET_SME_F64F64")
726 (VNx16HF "TARGET_STREAMING_SME_F16F16")
727 (VNx32HF "TARGET_STREAMING_SME_F16F16")
728 (VNx16BF "TARGET_STREAMING_SME_B16B16")
729 (VNx32BF "TARGET_STREAMING_SME_B16B16")])
731 ;; The modes for which outer product instructions are supported.
732 (define_mode_iterator SME_MOP_BHI [VNx16QI (VNx8HI "TARGET_SME_I16I64")])
733 (define_mode_iterator SME_MOP_HSDF [VNx4SF
734 (VNx2DF "TARGET_SME_F64F64")
735 (VNx8HF "TARGET_STREAMING_SME_F16F16")
736 (VNx8BF "TARGET_STREAMING_SME_B16B16")])
738 ;; ------------------------------------------------------------------
739 ;; Unspec enumerations for Advance SIMD. These could well go into
740 ;; aarch64.md but for their use in int_iterators here.
741 ;; ------------------------------------------------------------------
743 (define_c_enum "unspec"
745 UNSPEC_ASHIFT_SIGNED ; Used in aarch-simd.md.
746 UNSPEC_ASHIFT_UNSIGNED ; Used in aarch64-simd.md.
747 UNSPEC_ABS ; Used in aarch64-simd.md.
748 UNSPEC_FCVTN_FP8 ; Used in aarch64-simd.md.
749 UNSPEC_FCVTN2_FP8 ; Used in aarch64-builtins.cc.
750 UNSPEC_F1CVTL_FP8 ; Used in aarch64-simd.md.
751 UNSPEC_F1CVTL2_FP8 ; Used in aarch64-builtins.cc.
752 UNSPEC_F2CVTL_FP8 ; Used in aarch64-simd.md.
753 UNSPEC_F2CVTL2_FP8 ; Used in aarch64-builtins.cc.
754 UNSPEC_FDOT_FP8 ; Used in aarch64-simd.md.
755 UNSPEC_FDOT_LANE_FP8 ; Used in aarch64-simd.md.
756 UNSPEC_FMAX ; Used in aarch64-simd.md.
757 UNSPEC_FMAXNMV ; Used in aarch64-simd.md.
758 UNSPEC_FMAXV ; Used in aarch64-simd.md.
759 UNSPEC_FMIN ; Used in aarch64-simd.md.
760 UNSPEC_FMINNMV ; Used in aarch64-simd.md.
761 UNSPEC_FMINV ; Used in aarch64-simd.md.
762 UNSPEC_FADDV ; Used in aarch64-simd.md.
763 UNSPEC_FNEG ; Used in aarch64-simd.md.
764 UNSPEC_FSCALE ; Used in aarch64-simd.md.
765 UNSPEC_ADDV ; Used in aarch64-simd.md.
766 UNSPEC_SMAXV ; Used in aarch64-simd.md.
767 UNSPEC_SMINV ; Used in aarch64-simd.md.
768 UNSPEC_UMAXV ; Used in aarch64-simd.md.
769 UNSPEC_UMINV ; Used in aarch64-simd.md.
770 UNSPEC_SHADD ; Used in aarch64-simd.md.
771 UNSPEC_UHADD ; Used in aarch64-simd.md.
772 UNSPEC_SRHADD ; Used in aarch64-simd.md.
773 UNSPEC_URHADD ; Used in aarch64-simd.md.
774 UNSPEC_SHSUB ; Used in aarch64-simd.md.
775 UNSPEC_UHSUB ; Used in aarch64-simd.md.
776 UNSPEC_SQDMULH ; Used in aarch64-simd.md.
777 UNSPEC_SQRDMULH ; Used in aarch64-simd.md.
778 UNSPEC_PMUL ; Used in aarch64-simd.md.
779 UNSPEC_FMULX ; Used in aarch64-simd.md.
780 UNSPEC_USQADD ; Used in aarch64-simd.md.
781 UNSPEC_SUQADD ; Used in aarch64-simd.md.
782 UNSPEC_SSRA ; Used in aarch64-simd.md.
783 UNSPEC_USRA ; Used in aarch64-simd.md.
784 UNSPEC_SRSHR ; Used in aarch64-simd.md.
785 UNSPEC_URSHR ; Used in aarch64-simd.md.
786 UNSPEC_SQSHLU ; Used in aarch64-simd.md.
787 UNSPEC_SQSHL ; Used in aarch64-simd.md.
788 UNSPEC_UQSHL ; Used in aarch64-simd.md.
789 UNSPEC_SSHL ; Used in aarch64-simd.md.
790 UNSPEC_USHL ; Used in aarch64-simd.md.
791 UNSPEC_SRSHL ; Used in aarch64-simd.md.
792 UNSPEC_URSHL ; Used in aarch64-simd.md.
793 UNSPEC_SQRSHL ; Used in aarch64-simd.md.
794 UNSPEC_UQRSHL ; Used in aarch64-simd.md.
795 UNSPEC_SSLI ; Used in aarch64-simd.md.
796 UNSPEC_USLI ; Used in aarch64-simd.md.
797 UNSPEC_SSRI ; Used in aarch64-simd.md.
798 UNSPEC_USRI ; Used in aarch64-simd.md.
799 UNSPEC_SSHLL ; Used in aarch64-simd.md.
800 UNSPEC_USHLL ; Used in aarch64-simd.md.
801 UNSPEC_ADDP ; Used in aarch64-simd.md.
802 UNSPEC_TBL ; Used in vector permute patterns.
803 UNSPEC_TBLQ ; Used in vector permute patterns.
804 UNSPEC_TBX ; Used in vector permute patterns.
805 UNSPEC_TBXQ ; Used in vector permute patterns.
806 UNSPEC_CONCAT ; Used in vector permute patterns.
808 ;; The following permute unspecs are generated directly by
809 ;; aarch64_expand_vec_perm_const, so any changes to the underlying
810 ;; instructions would need a corresponding change there.
811 UNSPEC_ZIP1 ; Used in vector permute patterns.
812 UNSPEC_ZIP2 ; Used in vector permute patterns.
813 UNSPEC_UZP1 ; Used in vector permute patterns.
814 UNSPEC_UZP2 ; Used in vector permute patterns.
815 UNSPEC_TRN1 ; Used in vector permute patterns.
816 UNSPEC_TRN2 ; Used in vector permute patterns.
817 UNSPEC_EXT ; Used in vector permute patterns.
818 UNSPEC_REV64 ; Used in vector reverse patterns (permute).
819 UNSPEC_REV32 ; Used in vector reverse patterns (permute).
820 UNSPEC_REV16 ; Used in vector reverse patterns (permute).
822 UNSPEC_AESE ; Used in aarch64-simd.md.
823 UNSPEC_AESD ; Used in aarch64-simd.md.
824 UNSPEC_AESMC ; Used in aarch64-simd.md.
825 UNSPEC_AESIMC ; Used in aarch64-simd.md.
826 UNSPEC_SHA1C ; Used in aarch64-simd.md.
827 UNSPEC_SHA1M ; Used in aarch64-simd.md.
828 UNSPEC_SHA1P ; Used in aarch64-simd.md.
829 UNSPEC_SHA1H ; Used in aarch64-simd.md.
830 UNSPEC_SHA1SU0 ; Used in aarch64-simd.md.
831 UNSPEC_SHA1SU1 ; Used in aarch64-simd.md.
832 UNSPEC_SHA256H ; Used in aarch64-simd.md.
833 UNSPEC_SHA256H2 ; Used in aarch64-simd.md.
834 UNSPEC_SHA256SU0 ; Used in aarch64-simd.md.
835 UNSPEC_SHA256SU1 ; Used in aarch64-simd.md.
836 UNSPEC_PMULL ; Used in aarch64-simd.md.
837 UNSPEC_PMULL2 ; Used in aarch64-simd.md.
838 UNSPEC_REV_REGLIST ; Used in aarch64-simd.md.
839 UNSPEC_VEC_SHR ; Used in aarch64-simd.md.
840 UNSPEC_SQRDMLAH ; Used in aarch64-simd.md.
841 UNSPEC_SQRDMLSH ; Used in aarch64-simd.md.
842 UNSPEC_FMAXNM ; Used in aarch64-simd.md.
843 UNSPEC_FMINNM ; Used in aarch64-simd.md.
844 UNSPEC_SDOT ; Used in aarch64-simd.md.
845 UNSPEC_UDOT ; Used in aarch64-simd.md.
846 UNSPEC_SM3SS1 ; Used in aarch64-simd.md.
847 UNSPEC_SM3TT1A ; Used in aarch64-simd.md.
848 UNSPEC_SM3TT1B ; Used in aarch64-simd.md.
849 UNSPEC_SM3TT2A ; Used in aarch64-simd.md.
850 UNSPEC_SM3TT2B ; Used in aarch64-simd.md.
851 UNSPEC_SM3PARTW1 ; Used in aarch64-simd.md.
852 UNSPEC_SM3PARTW2 ; Used in aarch64-simd.md.
853 UNSPEC_SM4E ; Used in aarch64-simd.md.
854 UNSPEC_SM4EKEY ; Used in aarch64-simd.md.
855 UNSPEC_SHA512H ; Used in aarch64-simd.md.
856 UNSPEC_SHA512H2 ; Used in aarch64-simd.md.
857 UNSPEC_SHA512SU0 ; Used in aarch64-simd.md.
858 UNSPEC_SHA512SU1 ; Used in aarch64-simd.md.
859 UNSPEC_FMLAL ; Used in aarch64-simd.md.
860 UNSPEC_FMLSL ; Used in aarch64-simd.md.
861 UNSPEC_FMLAL2 ; Used in aarch64-simd.md.
862 UNSPEC_FMLSL2 ; Used in aarch64-simd.md.
863 UNSPEC_ADR ; Used in aarch64-sve.md.
864 UNSPEC_SEL ; Used in aarch64-sve.md.
865 UNSPEC_BRKA ; Used in aarch64-sve.md.
866 UNSPEC_BRKB ; Used in aarch64-sve.md.
867 UNSPEC_BRKN ; Used in aarch64-sve.md.
868 UNSPEC_BRKPA ; Used in aarch64-sve.md.
869 UNSPEC_BRKPB ; Used in aarch64-sve.md.
870 UNSPEC_PFIRST ; Used in aarch64-sve.md.
871 UNSPEC_PNEXT ; Used in aarch64-sve.md.
872 UNSPEC_CNTP ; Used in aarch64-sve.md.
873 UNSPEC_SADDV ; Used in aarch64-sve.md.
874 UNSPEC_UADDV ; Used in aarch64-sve.md.
875 UNSPEC_ANDV ; Used in aarch64-sve.md.
876 UNSPEC_IORV ; Used in aarch64-sve.md.
877 UNSPEC_XORV ; Used in aarch64-sve.md.
878 UNSPEC_ANDF ; Used in aarch64-sve.md.
879 UNSPEC_IORF ; Used in aarch64-sve.md.
880 UNSPEC_XORF ; Used in aarch64-sve.md.
881 UNSPEC_REVB ; Used in aarch64-sve.md.
882 UNSPEC_REVD ; Used in aarch64-sve2.md.
883 UNSPEC_REVH ; Used in aarch64-sve.md.
884 UNSPEC_REVW ; Used in aarch64-sve.md.
885 UNSPEC_REVBHW ; Used in aarch64-sve.md.
886 UNSPEC_SMUL_HIGHPART ; Used in aarch64-sve.md.
887 UNSPEC_UMUL_HIGHPART ; Used in aarch64-sve.md.
888 UNSPEC_FMLA ; Used in aarch64-sve.md.
889 UNSPEC_FMLS ; Used in aarch64-sve.md.
890 UNSPEC_FEXPA ; Used in aarch64-sve.md.
891 UNSPEC_FMMLA ; Used in aarch64-sve.md.
892 UNSPEC_FTMAD ; Used in aarch64-sve.md.
893 UNSPEC_FTSMUL ; Used in aarch64-sve.md.
894 UNSPEC_FTSSEL ; Used in aarch64-sve.md.
895 UNSPEC_SMATMUL ; Used in aarch64-sve.md.
896 UNSPEC_SET_NEONQ ; Used in aarch64-sve.md.
897 UNSPEC_UMATMUL ; Used in aarch64-sve.md.
898 UNSPEC_USMATMUL ; Used in aarch64-sve.md.
899 UNSPEC_TRN1Q ; Used in aarch64-sve.md.
900 UNSPEC_TRN2Q ; Used in aarch64-sve.md.
901 UNSPEC_UZP1Q ; Used in aarch64-sve.md.
902 UNSPEC_UZP2Q ; Used in aarch64-sve.md.
903 UNSPEC_ZIP1Q ; Used in aarch64-sve.md.
904 UNSPEC_ZIP2Q ; Used in aarch64-sve.md.
905 UNSPEC_TRN1_CONV ; Used in aarch64-sve.md.
906 UNSPEC_COND_CMPEQ_WIDE ; Used in aarch64-sve.md.
907 UNSPEC_COND_CMPGE_WIDE ; Used in aarch64-sve.md.
908 UNSPEC_COND_CMPGT_WIDE ; Used in aarch64-sve.md.
909 UNSPEC_COND_CMPHI_WIDE ; Used in aarch64-sve.md.
910 UNSPEC_COND_CMPHS_WIDE ; Used in aarch64-sve.md.
911 UNSPEC_COND_CMPLE_WIDE ; Used in aarch64-sve.md.
912 UNSPEC_COND_CMPLO_WIDE ; Used in aarch64-sve.md.
913 UNSPEC_COND_CMPLS_WIDE ; Used in aarch64-sve.md.
914 UNSPEC_COND_CMPLT_WIDE ; Used in aarch64-sve.md.
915 UNSPEC_COND_CMPNE_WIDE ; Used in aarch64-sve.md.
916 UNSPEC_COND_FABS ; Used in aarch64-sve.md.
917 UNSPEC_COND_FADD ; Used in aarch64-sve.md.
918 UNSPEC_COND_FAMAX ; Used in aarch64-sve.md.
919 UNSPEC_COND_FAMIN ; Used in aarch64-sve.md.
920 UNSPEC_COND_FCADD90 ; Used in aarch64-sve.md.
921 UNSPEC_COND_FCADD270 ; Used in aarch64-sve.md.
922 UNSPEC_COND_FCMEQ ; Used in aarch64-sve.md.
923 UNSPEC_COND_FCMGE ; Used in aarch64-sve.md.
924 UNSPEC_COND_FCMGT ; Used in aarch64-sve.md.
925 UNSPEC_COND_FCMLA ; Used in aarch64-sve.md.
926 UNSPEC_COND_FCMLA90 ; Used in aarch64-sve.md.
927 UNSPEC_COND_FCMLA180 ; Used in aarch64-sve.md.
928 UNSPEC_COND_FCMLA270 ; Used in aarch64-sve.md.
929 UNSPEC_COND_FCMLE ; Used in aarch64-sve.md.
930 UNSPEC_COND_FCMLT ; Used in aarch64-sve.md.
931 UNSPEC_COND_FCMNE ; Used in aarch64-sve.md.
932 UNSPEC_COND_FCMUO ; Used in aarch64-sve.md.
933 UNSPEC_COND_FCVT ; Used in aarch64-sve.md.
934 UNSPEC_COND_FCVTZS ; Used in aarch64-sve.md.
935 UNSPEC_COND_FCVTZU ; Used in aarch64-sve.md.
936 UNSPEC_COND_FDIV ; Used in aarch64-sve.md.
937 UNSPEC_COND_FMAX ; Used in aarch64-sve.md.
938 UNSPEC_COND_FMAXNM ; Used in aarch64-sve.md.
939 UNSPEC_COND_FMIN ; Used in aarch64-sve.md.
940 UNSPEC_COND_FMINNM ; Used in aarch64-sve.md.
941 UNSPEC_COND_FMLA ; Used in aarch64-sve.md.
942 UNSPEC_COND_FMLS ; Used in aarch64-sve.md.
943 UNSPEC_COND_FMUL ; Used in aarch64-sve.md.
944 UNSPEC_COND_FMULX ; Used in aarch64-sve.md.
945 UNSPEC_COND_FNEG ; Used in aarch64-sve.md.
946 UNSPEC_COND_FNMLA ; Used in aarch64-sve.md.
947 UNSPEC_COND_FNMLS ; Used in aarch64-sve.md.
948 UNSPEC_COND_FRECPX ; Used in aarch64-sve.md.
949 UNSPEC_COND_FRINTA ; Used in aarch64-sve.md.
950 UNSPEC_COND_FRINTI ; Used in aarch64-sve.md.
951 UNSPEC_COND_FRINTM ; Used in aarch64-sve.md.
952 UNSPEC_COND_FRINTN ; Used in aarch64-sve.md.
953 UNSPEC_COND_FRINTP ; Used in aarch64-sve.md.
954 UNSPEC_COND_FRINTX ; Used in aarch64-sve.md.
955 UNSPEC_COND_FRINTZ ; Used in aarch64-sve.md.
956 UNSPEC_COND_FSCALE ; Used in aarch64-sve.md.
957 UNSPEC_COND_FSQRT ; Used in aarch64-sve.md.
958 UNSPEC_COND_FSUB ; Used in aarch64-sve.md.
959 UNSPEC_COND_SCVTF ; Used in aarch64-sve.md.
960 UNSPEC_COND_SMAX ; Used in aarch64-sve.md.
961 UNSPEC_COND_SMIN ; Used in aarch64-sve.md.
962 UNSPEC_COND_UCVTF ; Used in aarch64-sve.md.
963 UNSPEC_LASTA ; Used in aarch64-sve.md.
964 UNSPEC_LASTB ; Used in aarch64-sve.md.
965 UNSPEC_ASHIFT_WIDE ; Used in aarch64-sve.md.
966 UNSPEC_ASHIFTRT_WIDE ; Used in aarch64-sve.md.
967 UNSPEC_LSHIFTRT_WIDE ; Used in aarch64-sve.md.
968 UNSPEC_LDFF1 ; Used in aarch64-sve.md.
969 UNSPEC_LDNF1 ; Used in aarch64-sve.md.
970 UNSPEC_FCADD90 ; Used in aarch64-simd.md.
971 UNSPEC_FCADD270 ; Used in aarch64-simd.md.
972 UNSPEC_FCMLA ; Used in aarch64-simd.md.
973 UNSPEC_FCMLA90 ; Used in aarch64-simd.md.
974 UNSPEC_FCMLA180 ; Used in aarch64-simd.md.
975 UNSPEC_FCMLA270 ; Used in aarch64-simd.md.
976 UNSPEC_FCMUL ; Used in aarch64-simd.md.
977 UNSPEC_FCMUL_CONJ ; Used in aarch64-simd.md.
978 UNSPEC_FCMLA_CONJ ; Used in aarch64-simd.md.
979 UNSPEC_FCMLA180_CONJ ; Used in aarch64-simd.md.
980 UNSPEC_ASRD ; Used in aarch64-sve.md.
981 UNSPEC_ADCLB ; Used in aarch64-sve2.md.
982 UNSPEC_ADCLT ; Used in aarch64-sve2.md.
983 UNSPEC_ADDHNB ; Used in aarch64-sve2.md.
984 UNSPEC_ADDHNT ; Used in aarch64-sve2.md.
985 UNSPEC_BDEP ; Used in aarch64-sve2.md.
986 UNSPEC_BEXT ; Used in aarch64-sve2.md.
987 UNSPEC_BGRP ; Used in aarch64-sve2.md.
988 UNSPEC_CADD270 ; Used in aarch64-sve2.md.
989 UNSPEC_CADD90 ; Used in aarch64-sve2.md.
990 UNSPEC_CDOT ; Used in aarch64-sve2.md.
991 UNSPEC_CDOT180 ; Used in aarch64-sve2.md.
992 UNSPEC_CDOT270 ; Used in aarch64-sve2.md.
993 UNSPEC_CDOT90 ; Used in aarch64-sve2.md.
994 UNSPEC_CMLA ; Used in aarch64-sve2.md.
995 UNSPEC_CMLA180 ; Used in aarch64-sve2.md.
996 UNSPEC_CMLA270 ; Used in aarch64-sve2.md.
997 UNSPEC_CMLA90 ; Used in aarch64-sve2.md.
998 UNSPEC_CMLA_CONJ ; Used in aarch64-sve2.md.
999 UNSPEC_CMLA180_CONJ ; Used in aarch64-sve2.md.
1000 UNSPEC_CMUL ; Used in aarch64-sve2.md.
1001 UNSPEC_CMUL_CONJ ; Used in aarch64-sve2.md.
1002 UNSPEC_CNTP_C ; Used in aarch64-sve2.md.
1003 UNSPEC_COND_FCVTLT ; Used in aarch64-sve2.md.
1004 UNSPEC_COND_FCVTNT ; Used in aarch64-sve2.md.
1005 UNSPEC_COND_FCVTX ; Used in aarch64-sve2.md.
1006 UNSPEC_COND_FCVTXNT ; Used in aarch64-sve2.md.
1007 UNSPEC_COND_FLOGB ; Used in aarch64-sve2.md.
1008 UNSPEC_DOT_FP8 ; Used in aarch64-sve2.md.
1009 UNSPEC_DOT_LANE_FP8 ; Used in aarch64-sve2.md.
1010 UNSPEC_EORBT ; Used in aarch64-sve2.md.
1011 UNSPEC_EORTB ; Used in aarch64-sve2.md.
1012 UNSPEC_F1CVT ; Used in aarch64-sve2.md.
1013 UNSPEC_F1CVTLT ; Used in aarch64-sve2.md.
1014 UNSPEC_F2CVT ; Used in aarch64-sve2.md.
1015 UNSPEC_F2CVTLT ; Used in aarch64-sve2.md.
1016 UNSPEC_FADDP ; Used in aarch64-sve2.md.
1017 UNSPEC_FCVTNB ; Used in aarch64-sve2.md.
1018 UNSPEC_FCVTNT ; Used in aarch64-sve2.md.
1019 UNSPEC_FMAXNMP ; Used in aarch64-sve2.md.
1020 UNSPEC_FMAXP ; Used in aarch64-sve2.md.
1021 UNSPEC_FMINNMP ; Used in aarch64-sve2.md.
1022 UNSPEC_FMINP ; Used in aarch64-sve2.md.
1023 UNSPEC_FMLALB ; Used in aarch64-sve2.md.
1024 UNSPEC_FMLALB_FP8 ; Used in aarch64-sve2.md.
1025 UNSPEC_FMLALLBB_FP8 ; Used in aarch64-sve2.md.
1026 UNSPEC_FMLALLBT_FP8 ; Used in aarch64-sve2.md.
1027 UNSPEC_FMLALLTB_FP8 ; Used in aarch64-sve2.md.
1028 UNSPEC_FMLALLTT_FP8 ; Used in aarch64-sve2.md.
1029 UNSPEC_FMLALT ; Used in aarch64-sve2.md.
1030 UNSPEC_FMLALT_FP8 ; Used in aarch64-sve2.md.
1031 UNSPEC_FMLSLB ; Used in aarch64-sve2.md.
1032 UNSPEC_FMLSLT ; Used in aarch64-sve2.md.
1033 UNSPEC_FP8FCVTN ; Used in aarch64-sve2.md.
1034 UNSPEC_HISTCNT ; Used in aarch64-sve2.md.
1035 UNSPEC_HISTSEG ; Used in aarch64-sve2.md.
1036 UNSPEC_LD1_COUNT ; Used in aarch64-sve2.md.
1037 UNSPEC_LDNT1_COUNT ; Used in aarch64-sve2.md.
1038 UNSPEC_MATCH ; Used in aarch64-sve2.md.
1039 UNSPEC_NMATCH ; Used in aarch64-sve2.md.
1040 UNSPEC_PEXT ; Used in aarch64-sve2.md.
1041 UNSPEC_PEXTx2 ; Used in aarch64-sve2.md.
1042 UNSPEC_PMULLB ; Used in aarch64-sve2.md.
1043 UNSPEC_PMULLB_PAIR ; Used in aarch64-sve2.md.
1044 UNSPEC_PMULLT ; Used in aarch64-sve2.md.
1045 UNSPEC_PMULLT_PAIR ; Used in aarch64-sve2.md.
1046 UNSPEC_PSEL ; Used in aarch64-sve2.md.
1047 UNSPEC_PTRUE_C ; Used in aarch64-sve2.md.
1048 UNSPEC_RADDHNB ; Used in aarch64-sve2.md.
1049 UNSPEC_RADDHNT ; Used in aarch64-sve2.md.
1050 UNSPEC_RSHRNB ; Used in aarch64-sve2.md.
1051 UNSPEC_RSHRNT ; Used in aarch64-sve2.md.
1052 UNSPEC_RSUBHNB ; Used in aarch64-sve2.md.
1053 UNSPEC_RSUBHNT ; Used in aarch64-sve2.md.
1054 UNSPEC_SABDLB ; Used in aarch64-sve2.md.
1055 UNSPEC_SABDLT ; Used in aarch64-sve2.md.
1056 UNSPEC_SADDLB ; Used in aarch64-sve2.md.
1057 UNSPEC_SADDLBT ; Used in aarch64-sve2.md.
1058 UNSPEC_SADDLT ; Used in aarch64-sve2.md.
1059 UNSPEC_SADDWB ; Used in aarch64-sve2.md.
1060 UNSPEC_SADDWT ; Used in aarch64-sve2.md.
1061 UNSPEC_SBCLB ; Used in aarch64-sve2.md.
1062 UNSPEC_SBCLT ; Used in aarch64-sve2.md.
1063 UNSPEC_SHRNB ; Used in aarch64-sve2.md.
1064 UNSPEC_SHRNT ; Used in aarch64-sve2.md.
1065 UNSPEC_SLI ; Used in aarch64-sve2.md.
1066 UNSPEC_SMAXP ; Used in aarch64-sve2.md.
1067 UNSPEC_SMINP ; Used in aarch64-sve2.md.
1068 UNSPEC_SMULHRS ; Used in aarch64-sve2.md.
1069 UNSPEC_SMULHS ; Used in aarch64-sve2.md.
1070 UNSPEC_SMULLB ; Used in aarch64-sve2.md.
1071 UNSPEC_SMULLT ; Used in aarch64-sve2.md.
1072 UNSPEC_SQCADD270 ; Used in aarch64-sve2.md.
1073 UNSPEC_SQCADD90 ; Used in aarch64-sve2.md.
1074 UNSPEC_SQDMULLB ; Used in aarch64-sve2.md.
1075 UNSPEC_SQDMULLBT ; Used in aarch64-sve2.md.
1076 UNSPEC_SQDMULLT ; Used in aarch64-sve2.md.
1077 UNSPEC_SQRDCMLAH ; Used in aarch64-sve2.md.
1078 UNSPEC_SQRDCMLAH180 ; Used in aarch64-sve2.md.
1079 UNSPEC_SQRDCMLAH270 ; Used in aarch64-sve2.md.
1080 UNSPEC_SQRDCMLAH90 ; Used in aarch64-sve2.md.
1081 UNSPEC_SQRSHR ; Used in aarch64-sve2.md.
1082 UNSPEC_SQRSHRN ; Used in aarch64-sve2.md.
1083 UNSPEC_SQRSHRNB ; Used in aarch64-sve2.md.
1084 UNSPEC_SQRSHRNT ; Used in aarch64-sve2.md.
1085 UNSPEC_SQRSHRU ; Used in aarch64-sve2.md.
1086 UNSPEC_SQRSHRUN ; Used in aarch64-sve2.md.
1087 UNSPEC_SQRSHRUNB ; Used in aarch64-sve2.md.
1088 UNSPEC_SQRSHRUNT ; Used in aarch64-sve2.md.
1089 UNSPEC_SQSHRNB ; Used in aarch64-sve2.md.
1090 UNSPEC_SQSHRNT ; Used in aarch64-sve2.md.
1091 UNSPEC_SQSHRUNB ; Used in aarch64-sve2.md.
1092 UNSPEC_SQSHRUNT ; Used in aarch64-sve2.md.
1093 UNSPEC_SQXTNB ; Used in aarch64-sve2.md.
1094 UNSPEC_SQXTNT ; Used in aarch64-sve2.md.
1095 UNSPEC_SQXTUNB ; Used in aarch64-sve2.md.
1096 UNSPEC_SQXTUNT ; Used in aarch64-sve2.md.
1097 UNSPEC_SRI ; Used in aarch64-sve2.md.
1098 UNSPEC_SSHLLB ; Used in aarch64-sve2.md.
1099 UNSPEC_SSHLLT ; Used in aarch64-sve2.md.
1100 UNSPEC_SSUBLB ; Used in aarch64-sve2.md.
1101 UNSPEC_SSUBLBT ; Used in aarch64-sve2.md.
1102 UNSPEC_SSUBLT ; Used in aarch64-sve2.md.
1103 UNSPEC_SSUBLTB ; Used in aarch64-sve2.md.
1104 UNSPEC_SSUBWB ; Used in aarch64-sve2.md.
1105 UNSPEC_SSUBWT ; Used in aarch64-sve2.md.
1106 UNSPEC_ST1_COUNT ; Used in aarch64-sve2.md.
1107 UNSPEC_STNT1_COUNT ; Used in aarch64-sve2.md.
1108 UNSPEC_SUBHNB ; Used in aarch64-sve2.md.
1109 UNSPEC_SUBHNT ; Used in aarch64-sve2.md.
1110 UNSPEC_TBL2 ; Used in aarch64-sve2.md.
1111 UNSPEC_TRN ; Used in aarch64-builtins.cc
1112 UNSPEC_UABDLB ; Used in aarch64-sve2.md.
1113 UNSPEC_UABDLT ; Used in aarch64-sve2.md.
1114 UNSPEC_UADDLB ; Used in aarch64-sve2.md.
1115 UNSPEC_UADDLT ; Used in aarch64-sve2.md.
1116 UNSPEC_UADDWB ; Used in aarch64-sve2.md.
1117 UNSPEC_UADDWT ; Used in aarch64-sve2.md.
1118 UNSPEC_UMAXP ; Used in aarch64-sve2.md.
1119 UNSPEC_UMINP ; Used in aarch64-sve2.md.
1120 UNSPEC_UMULHRS ; Used in aarch64-sve2.md.
1121 UNSPEC_UMULHS ; Used in aarch64-sve2.md.
1122 UNSPEC_UMULLB ; Used in aarch64-sve2.md.
1123 UNSPEC_UMULLT ; Used in aarch64-sve2.md.
1124 UNSPEC_UQRSHR ; Used in aarch64-sve2.md.
1125 UNSPEC_UQRSHRN ; Used in aarch64-sve2.md.
1126 UNSPEC_UQRSHRNB ; Used in aarch64-sve2.md.
1127 UNSPEC_UQRSHRNT ; Used in aarch64-sve2.md.
1128 UNSPEC_UQSHRNB ; Used in aarch64-sve2.md.
1129 UNSPEC_UQSHRNT ; Used in aarch64-sve2.md.
1130 UNSPEC_UQXTNB ; Used in aarch64-sve2.md.
1131 UNSPEC_UQXTNT ; Used in aarch64-sve2.md.
1132 UNSPEC_USHLLB ; Used in aarch64-sve2.md.
1133 UNSPEC_USHLLT ; Used in aarch64-sve2.md.
1134 UNSPEC_USUBLB ; Used in aarch64-sve2.md.
1135 UNSPEC_USUBLT ; Used in aarch64-sve2.md.
1136 UNSPEC_USUBWB ; Used in aarch64-sve2.md.
1137 UNSPEC_USUBWT ; Used in aarch64-sve2.md.
1138 UNSPEC_USDOT ; Used in aarch64-simd.md.
1139 UNSPEC_UZP ; Used in aarch64-sve2.md.
1140 UNSPEC_UZPQ ; Used in aarch64-sve2.md.
1141 UNSPEC_ZIP ; Used in aarch64-sve2.md.
1142 UNSPEC_ZIPQ ; Used in aarch64-sve2.md.
1143 UNSPEC_SUDOT ; Used in aarch64-simd.md.
1144 UNSPEC_BFDOT ; Used in aarch64-simd.md.
1145 UNSPEC_BFMLALB ; Used in aarch64-sve.md.
1146 UNSPEC_BFMLALT ; Used in aarch64-sve.md.
1147 UNSPEC_BFMLSLB ; Used in aarch64-sve.md.
1148 UNSPEC_BFMLSLT ; Used in aarch64-sve.md.
1149 UNSPEC_BFMMLA ; Used in aarch64-sve.md.
1150 UNSPEC_BFCVTN ; Used in aarch64-simd.md.
1151 UNSPEC_BFCVTN2 ; Used in aarch64-simd.md.
1152 UNSPEC_BFCVT ; Used in aarch64-simd.md.
1153 UNSPEC_FCVTXN ; Used in aarch64-simd.md.
1154 UNSPEC_FAMAX ; Used in aarch64-simd.md.
1155 UNSPEC_FAMIN ; Used in aarch64-simd.md.
1156 UNSPEC_LUTI ; Used in aarch64-simd.md.
1157 UNSPEC_LUTI2 ; Used in aarch64-simd.md.
1158 UNSPEC_LUTI4 ; Used in aarch64-simd.md.
1160 ;; All used in aarch64-sve2.md
1179 UNSPEC_PMOV_PACK_LANE
1181 UNSPEC_PMOV_UNPACK_LANE
1201 ;; All used in aarch64-sme.md
1203 UNSPEC_SME_ADD_WRITE
1222 UNSPEC_SME_READZ_HOR
1223 UNSPEC_SME_READZ_VER
1233 UNSPEC_SME_SUB_WRITE
1249 UNSPEC_SME_WRITE_HOR
1250 UNSPEC_SME_WRITE_VER
1253 ;; ------------------------------------------------------------------
1254 ;; Unspec enumerations for Atomics. They are here so that they can be
1255 ;; used in the int_iterators for atomic operations.
1256 ;; ------------------------------------------------------------------
1258 (define_c_enum "unspecv"
1260 UNSPECV_LX ; Represent a load-exclusive.
1261 UNSPECV_SX ; Represent a store-exclusive.
1262 UNSPECV_LDA ; Represent an atomic load or load-acquire.
1263 UNSPECV_LDAP ; Represent an atomic acquire load with RCpc semantics.
1264 UNSPECV_STL ; Represent an atomic store or store-release.
1265 UNSPECV_ATOMIC_CMPSW ; Represent an atomic compare swap.
1266 UNSPECV_ATOMIC_EXCHG ; Represent an atomic exchange.
1267 UNSPECV_ATOMIC_CAS ; Represent an atomic CAS.
1268 UNSPECV_ATOMIC_SWP ; Represent an atomic SWP.
1269 UNSPECV_ATOMIC_OP ; Represent an atomic operation.
1270 UNSPECV_ATOMIC_LDOP_OR ; Represent an atomic load-or
1271 UNSPECV_ATOMIC_LDOP_BIC ; Represent an atomic load-bic
1272 UNSPECV_ATOMIC_LDOP_XOR ; Represent an atomic load-xor
1273 UNSPECV_ATOMIC_LDOP_PLUS ; Represent an atomic load-add
1276 ;; -------------------------------------------------------------------
1278 ;; -------------------------------------------------------------------
1280 ;; "e" for signaling operations, "" for quiet operations.
1281 (define_mode_attr e [(CCFP "") (CCFPE "e")])
1283 ;; In GPI templates, a string like "%<w>0" will expand to "%w0" in the
1284 ;; 32-bit version and "%x0" in the 64-bit version.
1285 (define_mode_attr w [(QI "w") (HI "w") (SI "w") (DI "x") (SF "s") (DF "d")])
1287 ;; The size of access, in bytes.
1288 (define_mode_attr ldst_sz [(SI "4") (DI "8")])
1289 ;; Likewise for load/store pair.
1290 (define_mode_attr ldpstp_sz [(SI "8") (DI "16")])
1292 ;; Size of element access for STP/LDP-generated vectors.
1293 (define_mode_attr ldpstp_vel_sz [(V2SI "8") (V2SF "8") (V2DI "16") (V2DF "16")])
1295 ;; For inequal width int to float conversion
1296 (define_mode_attr w1 [(HF "w") (SF "w") (DF "x")])
1297 (define_mode_attr w2 [(HF "x") (SF "x") (DF "w")])
1299 ;; For width of fp registers in fcvt instruction
1300 (define_mode_attr fpw [(DI "s") (SI "d")])
1302 (define_mode_attr short_mask [(HI "65535") (QI "255")])
1304 (define_mode_attr half_mask [(HI "255") (SI "65535") (DI "4294967295")])
1306 ;; For constraints used in scalar immediate vector moves
1307 (define_mode_attr hq [(HI "h") (QI "q")])
1309 ;; For doubling width of an integer mode
1310 (define_mode_attr DWI [(QI "HI") (HI "SI") (SI "DI") (DI "TI")])
1312 (define_mode_attr fcvt_change_mode [(SI "df") (DI "sf")])
1314 (define_mode_attr FCVT_CHANGE_MODE [(SI "DF") (DI "SF")])
1316 ;; For scalar usage of vector/FP registers
1317 (define_mode_attr v [(QI "b") (HI "h") (SI "s") (DI "d")
1318 (HF "h") (SF "s") (DF "d")
1319 (V8QI "") (V16QI "")
1324 (V8HF "") (V2DF "")])
1326 ;; For scalar usage of vector/FP registers, narrowing
1327 (define_mode_attr vn2 [(QI "") (HI "b") (SI "h") (DI "s")
1328 (V8QI "") (V16QI "")
1332 (V4SF "") (V2DF "")])
1334 ;; For scalar usage of vector/FP registers, widening
1335 (define_mode_attr vw2 [(DI "") (QI "h") (HI "s") (SI "d")
1336 (V8QI "") (V16QI "")
1340 (V4SF "") (V2DF "")])
1342 ;; Register Type Name and Vector Arrangement Specifier for when
1343 ;; we are doing scalar for DI and SIMD for SI (ignoring all but
1345 (define_mode_attr rtn [(DI "d") (SI "")])
1346 (define_mode_attr vas [(DI "") (SI ".2s")])
1348 ;; Map a vector to the number of units in it, if the size of the mode
1350 (define_mode_attr nunits [(V8QI "8") (V16QI "16")
1351 (V4HI "4") (V8HI "8")
1352 (V2SI "2") (V4SI "4")
1353 (V1DI "1") (V2DI "2")
1354 (V4HF "4") (V8HF "8")
1355 (V4BF "4") (V8BF "8")
1356 (V2SF "2") (V4SF "4")
1357 (V1DF "1") (V2DF "2")
1361 ;; Map a mode to the number of bits in it, if the size of the mode
1363 (define_mode_attr bitsize [(V8QI "64") (V16QI "128")
1364 (V4HI "64") (V8HI "128")
1365 (V2SI "64") (V4SI "128")
1366 (V1DI "64") (V2DI "128")])
1368 ;; Map a floating point or integer mode to the appropriate register name prefix
1369 (define_mode_attr s [(HF "h") (SF "s") (DF "d") (SI "s") (DI "d")])
1371 ;; Give the length suffix letter for a sign- or zero-extension.
1372 (define_mode_attr size [(QI "b") (HI "h") (SI "w")])
1374 ;; Give the number of bits in the mode
1375 (define_mode_attr sizen [(QI "8") (HI "16") (SI "32") (DI "64")])
1376 (define_mode_attr ZEROM [(QI "SI") (HI "SI") (SI "SI") (DI "DI")])
1377 (define_mode_attr zerom [(QI "si") (HI "si") (SI "si") (DI "di")])
1379 ;; Give the ordinal of the MSB in the mode
1380 (define_mode_attr sizem1 [(QI "#7") (HI "#15") (SI "#31") (DI "#63")
1381 (HF "#15") (SF "#31") (DF "#63")])
1383 ;; The number of bits in a vector element, or controlled by a predicate
1385 (define_mode_attr elem_bits [(VNx16BI "8") (VNx8BI "16")
1386 (VNx4BI "32") (VNx2BI "64")
1387 (VNx16QI "8") (VNx32QI "8") (VNx64QI "8")
1388 (VNx8HI "16") (VNx16HI "16") (VNx32HI "16")
1389 (VNx8HF "16") (VNx16HF "16") (VNx32HF "16")
1390 (VNx8BF "16") (VNx16BF "16") (VNx32BF "16")
1391 (VNx4SI "32") (VNx8SI "32") (VNx16SI "32")
1392 (VNx4SF "32") (VNx8SF "32") (VNx16SF "32")
1393 (VNx2DI "64") (VNx4DI "64") (VNx8DI "64")
1394 (VNx2DF "64") (VNx4DF "64") (VNx8DF "64")
1397 ;; The number of bits in a vector container.
1398 (define_mode_attr container_bits [(VNx16QI "8")
1399 (VNx8HI "16") (VNx8QI "16") (VNx8HF "16")
1401 (VNx4SI "32") (VNx4HI "32") (VNx4QI "32")
1402 (VNx4SF "32") (VNx4HF "32") (VNx4BF "32")
1403 (VNx2DI "64") (VNx2SI "64") (VNx2HI "64")
1404 (VNx2QI "64") (VNx2DF "64") (VNx2SF "64")
1405 (VNx2HF "64") (VNx2BF "64")])
1407 ;; Attribute to describe constants acceptable in logical operations
1408 (define_mode_attr lconst [(SI "K") (DI "L")])
1410 ;; Attribute to describe constants acceptable in logical and operations
1411 (define_mode_attr lconst2 [(SI "UsO") (DI "UsP")])
1413 ;; Map a mode to a specific constraint character.
1414 (define_mode_attr cmode [(QI "q") (HI "h") (SI "s") (DI "d")])
1416 ;; Map a mode to a specific constraint character for calling
1417 ;; appropriate version of crc.
1418 (define_mode_attr crc_data_type [(QI "b") (HI "h") (SI "w") (DI "x")])
1420 ;; Map modes to Usg and Usj constraints for SISD right shifts
1421 (define_mode_attr cmode_simd [(SI "g") (DI "j")])
1423 (define_mode_attr Vtype [(V8QI "8b") (V16QI "16b")
1424 (V4HI "4h") (V8HI "8h")
1425 (V4BF "4h") (V8BF "8h")
1426 (V2SI "2s") (V4SI "4s")
1428 (V2DI "2d") (V2SF "2s")
1429 (V4SF "4s") (V2DF "2d")
1430 (V4HF "4h") (V8HF "8h")
1431 (V2x8QI "8b") (V2x4HI "4h")
1432 (V2x2SI "2s") (V2x1DI "1d")
1433 (V2x4HF "4h") (V2x2SF "2s")
1434 (V2x1DF "1d") (V2x4BF "4h")
1435 (V2x16QI "16b") (V2x8HI "8h")
1436 (V2x4SI "4s") (V2x2DI "2d")
1437 (V2x8HF "8h") (V2x4SF "4s")
1438 (V2x2DF "2d") (V2x8BF "8h")
1439 (V3x8QI "8b") (V3x4HI "4h")
1440 (V3x2SI "2s") (V3x1DI "1d")
1441 (V3x4HF "4h") (V3x2SF "2s")
1442 (V3x1DF "1d") (V3x4BF "4h")
1443 (V3x16QI "16b") (V3x8HI "8h")
1444 (V3x4SI "4s") (V3x2DI "2d")
1445 (V3x8HF "8h") (V3x4SF "4s")
1446 (V3x2DF "2d") (V3x8BF "8h")
1447 (V4x8QI "8b") (V4x4HI "4h")
1448 (V4x2SI "2s") (V4x1DI "1d")
1449 (V4x4HF "4h") (V4x2SF "2s")
1450 (V4x1DF "1d") (V4x4BF "4h")
1451 (V4x16QI "16b") (V4x8HI "8h")
1452 (V4x4SI "4s") (V4x2DI "2d")
1453 (V4x8HF "8h") (V4x4SF "4s")
1454 (V4x2DF "2d") (V4x8BF "8h")
1455 (VNx16QI "16b") (VNx8HI "8h")
1456 (VNx4SI "4s") (VNx2DI "2d")
1457 (VNx8HF "8h") (VNx4SF "4s")
1458 (VNx2DF "2d") (VNx8BF "8h")])
1460 ;; Map mode to type used in widening multiplies.
1461 (define_mode_attr Vcondtype [(V4HI "4h") (V8HI "4h") (V2SI "2s") (V4SI "2s")])
1463 ;; Map lane mode to name
1464 (define_mode_attr Qlane [(V4HI "_v4hi") (V8HI "q_v4hi")
1465 (V2SI "_v2si") (V4SI "q_v2si")])
1467 (define_mode_attr Vrevsuff [(V4HI "16") (V8HI "16") (V2SI "32")
1468 (V4SI "32") (V2DI "64")])
1470 (define_mode_attr Vmtype [(V8QI ".8b") (V16QI ".16b")
1471 (V4HI ".4h") (V8HI ".8h")
1472 (V2SI ".2s") (V4SI ".4s")
1473 (V2DI ".2d") (V4HF ".4h")
1474 (V8HF ".8h") (V4BF ".4h")
1475 (V8BF ".8h") (V2SF ".2s")
1476 (V4SF ".4s") (V2DF ".2d")
1482 ;; Register suffix narrowed modes for VQN.
1483 (define_mode_attr Vmntype [(V8HI ".8b") (V4SI ".4h")
1488 ;; Mode-to-individual element type mapping.
1489 (define_mode_attr Vetype [(V8QI "b") (V16QI "b")
1490 (V4HI "h") (V8HI "h")
1491 (V2SI "s") (V4SI "s")
1492 (V2DI "d") (V1DI "d")
1493 (V4HF "h") (V8HF "h")
1494 (V2SF "s") (V4SF "s")
1495 (V2DF "d") (V1DF "d")
1496 (V2x8QI "b") (V2x4HI "h")
1497 (V2x2SI "s") (V2x1DI "d")
1498 (V2x4HF "h") (V2x2SF "s")
1499 (V2x1DF "d") (V2x4BF "h")
1500 (V2x16QI "b") (V2x8HI "h")
1501 (V2x4SI "s") (V2x2DI "d")
1502 (V2x8HF "h") (V2x4SF "s")
1503 (V2x2DF "d") (V2x8BF "h")
1504 (V3x8QI "b") (V3x4HI "h")
1505 (V3x2SI "s") (V3x1DI "d")
1506 (V3x4HF "h") (V3x2SF "s")
1507 (V3x1DF "d") (V3x4BF "h")
1508 (V3x16QI "b") (V3x8HI "h")
1509 (V3x4SI "s") (V3x2DI "d")
1510 (V3x8HF "h") (V3x4SF "s")
1511 (V3x2DF "d") (V3x8BF "h")
1512 (V4x8QI "b") (V4x4HI "h")
1513 (V4x2SI "s") (V4x1DI "d")
1514 (V4x4HF "h") (V4x2SF "s")
1515 (V4x1DF "d") (V4x4BF "h")
1516 (V4x16QI "b") (V4x8HI "h")
1517 (V4x4SI "s") (V4x2DI "d")
1518 (V4x8HF "h") (V4x4SF "s")
1519 (V4x2DF "d") (V4x8BF "h")
1520 (VNx16BI "b") (VNx8BI "h") (VNx4BI "s") (VNx2BI "d")
1521 (VNx16QI "b") (VNx8QI "b") (VNx4QI "b") (VNx2QI "b")
1522 (VNx8HI "h") (VNx4HI "h") (VNx2HI "h")
1523 (VNx8HF "h") (VNx4HF "h") (VNx2HF "h")
1524 (VNx8BF "h") (VNx4BF "h") (VNx2BF "h")
1525 (VNx4SI "s") (VNx2SI "s")
1526 (VNx4SF "s") (VNx2SF "s")
1530 (VNx32QI "b") (VNx64QI "b")
1531 (VNx16HI "h") (VNx32HI "h")
1532 (VNx16HF "h") (VNx32HF "h")
1533 (VNx16BF "h") (VNx32BF "h")
1534 (VNx8SI "s") (VNx16SI "s")
1535 (VNx8SF "s") (VNx16SF "s")
1536 (VNx4DI "d") (VNx8DI "d")
1537 (VNx4DF "d") (VNx8DF "d")
1538 (BF "h") (V4BF "h") (V8BF "h")
1544 ;; Like Vetype, but map to types that are a quarter of the element size.
1545 (define_mode_attr Vetype_fourth [(VNx4SI "b") (VNx2DI "h")])
1547 ;; Equivalent of "size" for a vector element.
1548 (define_mode_attr Vesize [(VNx16QI "b") (VNx8QI "b") (VNx4QI "b") (VNx2QI "b")
1549 (VNx8HI "h") (VNx4HI "h") (VNx2HI "h")
1550 (VNx8HF "h") (VNx4HF "h") (VNx2HF "h")
1551 (VNx8BF "h") (VNx4BF "h") (VNx2BF "h")
1552 (VNx4SI "w") (VNx2SI "w")
1553 (VNx4SF "w") (VNx2SF "w")
1557 (VNx32QI "b") (VNx48QI "b") (VNx64QI "b")
1558 (VNx16HI "h") (VNx24HI "h") (VNx32HI "h")
1559 (VNx16HF "h") (VNx24HF "h") (VNx32HF "h")
1560 (VNx16BF "h") (VNx24BF "h") (VNx32BF "h")
1561 (VNx8SI "w") (VNx12SI "w") (VNx16SI "w")
1562 (VNx8SF "w") (VNx12SF "w") (VNx16SF "w")
1563 (VNx4DI "d") (VNx6DI "d") (VNx8DI "d")
1564 (VNx4DF "d") (VNx6DF "d") (VNx8DF "d")])
1566 ;; The Z register suffix for an SVE mode's element container, i.e. the
1567 ;; Vetype of full SVE modes that have the same number of elements.
1568 (define_mode_attr Vctype [(VNx16QI "b") (VNx8QI "h") (VNx4QI "s") (VNx2QI "d")
1569 (VNx8HI "h") (VNx4HI "s") (VNx2HI "d")
1570 (VNx8HF "h") (VNx4HF "s") (VNx2HF "d")
1571 (VNx8BF "h") (VNx4BF "s") (VNx2BF "d")
1572 (VNx4SI "s") (VNx2SI "d")
1573 (VNx4SF "s") (VNx2SF "d")
1577 ;; The instruction mnemonic suffix for an SVE mode's element container,
1578 ;; i.e. the Vewtype of full SVE modes that have the same number of elements.
1579 (define_mode_attr Vcwtype [(VNx16QI "b") (VNx8QI "h") (VNx4QI "w") (VNx2QI "d")
1580 (VNx8HI "h") (VNx4HI "w") (VNx2HI "d")
1581 (VNx8HF "h") (VNx4HF "w") (VNx2HF "d")
1582 (VNx8BF "h") (VNx4BF "w") (VNx2BF "d")
1583 (VNx4SI "w") (VNx2SI "d")
1584 (VNx4SF "w") (VNx2SF "d")
1588 ;; Vetype is used everywhere in scheduling type and assembly output,
1589 ;; sometimes they are not the same, for example HF modes on some
1590 ;; instructions. stype is defined to represent scheduling type
1592 (define_mode_attr stype [(V8QI "b") (V16QI "b") (V4HI "s") (V8HI "s")
1593 (V2SI "s") (V4SI "s") (V2DI "d") (V4HF "s")
1594 (V8HF "s") (V2SF "s") (V4SF "s") (V2DF "d")
1595 (HF "s") (SF "s") (DF "d") (QI "b") (HI "s")
1598 ;; Mode-to-bitwise operation type mapping.
1599 (define_mode_attr Vbtype [(V8QI "8b") (V16QI "16b")
1600 (V4HI "8b") (V8HI "16b")
1601 (V2SI "8b") (V4SI "16b")
1602 (V2DI "16b") (V4HF "8b")
1603 (V8HF "16b") (V2SF "8b")
1604 (V4SF "16b") (V2DF "16b")
1608 (V4BF "8b") (V8BF "16b")])
1610 ;; Mode to double type mapping.
1611 (define_mode_attr Vconqtype [(V8QI ".16b") (V16QI ".16b")
1612 (V4HI ".8h") (V8HI ".8h")
1613 (V4HF ".8h") (V8HF ".8h")
1614 (V4BF ".8h") (V8BF ".8h")])
1616 ;; Advanced SIMD vector structure to element modes.
1617 (define_mode_attr VSTRUCT_ELT [(V2x8QI "V8QI") (V2x4HI "V4HI")
1618 (V2x2SI "V2SI") (V2x1DI "DI")
1619 (V2x4HF "V4HF") (V2x2SF "V2SF")
1620 (V2x1DF "DF") (V2x4BF "V4BF")
1621 (V3x8QI "V8QI") (V3x4HI "V4HI")
1622 (V3x2SI "V2SI") (V3x1DI "DI")
1623 (V3x4HF "V4HF") (V3x2SF "V2SF")
1624 (V3x1DF "DF") (V3x4BF "V4BF")
1625 (V4x8QI "V8QI") (V4x4HI "V4HI")
1626 (V4x2SI "V2SI") (V4x1DI "DI")
1627 (V4x4HF "V4HF") (V4x2SF "V2SF")
1628 (V4x1DF "DF") (V4x4BF "V4BF")
1629 (V2x16QI "V16QI") (V2x8HI "V8HI")
1630 (V2x4SI "V4SI") (V2x2DI "V2DI")
1631 (V2x8HF "V8HF") (V2x4SF "V4SF")
1632 (V2x2DF "V2DF") (V2x8BF "V8BF")
1633 (V3x16QI "V16QI") (V3x8HI "V8HI")
1634 (V3x4SI "V4SI") (V3x2DI "V2DI")
1635 (V3x8HF "V8HF") (V3x4SF "V4SF")
1636 (V3x2DF "V2DF") (V3x8BF "V8BF")
1637 (V4x16QI "V16QI") (V4x8HI "V8HI")
1638 (V4x4SI "V4SI") (V4x2DI "V2DI")
1639 (V4x8HF "V8HF") (V4x4SF "V4SF")
1640 (V4x2DF "V2DF") (V4x8BF "V8BF")])
1642 ;; Advanced SIMD vector structure to element modes in lower case.
1643 (define_mode_attr vstruct_elt [(V2x8QI "v8qi") (V2x4HI "v4hi")
1644 (V2x2SI "v2si") (V2x1DI "di")
1645 (V2x4HF "v4hf") (V2x2SF "v2sf")
1646 (V2x1DF "df") (V2x4BF "v4bf")
1647 (V3x8QI "v8qi") (V3x4HI "v4hi")
1648 (V3x2SI "v2si") (V3x1DI "di")
1649 (V3x4HF "v4hf") (V3x2SF "v2sf")
1650 (V3x1DF "df") (V3x4BF "v4bf")
1651 (V4x8QI "v8qi") (V4x4HI "v4hi")
1652 (V4x2SI "v2si") (V4x1DI "di")
1653 (V4x4HF "v4hf") (V4x2SF "v2sf")
1654 (V4x1DF "df") (V4x4BF "v4bf")
1655 (V2x16QI "v16qi") (V2x8HI "v8hi")
1656 (V2x4SI "v4si") (V2x2DI "v2di")
1657 (V2x8HF "v8hf") (V2x4SF "v4sf")
1658 (V2x2DF "v2df") (V2x8BF "v8bf")
1659 (V3x16QI "v16qi") (V3x8HI "v8hi")
1660 (V3x4SI "v4si") (V3x2DI "v2di")
1661 (V3x8HF "v8hf") (V3x4SF "v4sf")
1662 (V3x2DF "v2df") (V3x8BF "v8bf")
1663 (V4x16QI "v16qi") (V4x8HI "v8hi")
1664 (V4x4SI "v4si") (V4x2DI "v2di")
1665 (V4x8HF "v8hf") (V4x4SF "v4sf")
1666 (V4x2DF "v2df") (V4x8BF "v8bf")])
1668 ;; Define element mode for each vector mode.
1669 (define_mode_attr VEL [(V8QI "QI") (V16QI "QI")
1670 (V4HI "HI") (V8HI "HI")
1671 (V2SI "SI") (V4SI "SI")
1672 (DI "DI") (V1DI "DI")
1674 (V4HF "HF") (V8HF "HF")
1675 (V2SF "SF") (V4SF "SF")
1676 (DF "DF") (V1DF "DF")
1680 (V4BF "BF") (V8BF "BF")
1681 (VNx16QI "QI") (VNx8QI "QI") (VNx4QI "QI") (VNx2QI "QI")
1682 (VNx8HI "HI") (VNx4HI "HI") (VNx2HI "HI")
1683 (VNx8HF "HF") (VNx4HF "HF") (VNx2HF "HF")
1684 (VNx8BF "BF") (VNx4BF "BF") (VNx2BF "BF")
1685 (VNx4SI "SI") (VNx2SI "SI")
1686 (VNx4SF "SF") (VNx2SF "SF")
1690 ;; Define element mode for each vector mode (lower case).
1691 (define_mode_attr Vel [(V8QI "qi") (V16QI "qi")
1692 (V4HI "hi") (V8HI "hi")
1693 (V2SI "si") (V4SI "si")
1694 (DI "di") (V1DI "si")
1696 (V4HF "hf") (V8HF "hf")
1697 (V2SF "sf") (V4SF "sf")
1698 (V1DF "df") (V2DF "df")
1701 (V4BF "bf") (V8BF "bf")
1702 (VNx16QI "qi") (VNx8QI "qi") (VNx4QI "qi") (VNx2QI "qi")
1703 (VNx8HI "hi") (VNx4HI "hi") (VNx2HI "hi")
1704 (VNx8HF "hf") (VNx4HF "hf") (VNx2HF "hf")
1705 (VNx8BF "bf") (VNx4BF "bf") (VNx2BF "bf")
1706 (VNx4SI "si") (VNx2SI "si")
1707 (VNx4SF "sf") (VNx2SF "sf")
1711 ;; Element mode with floating-point values replaced by like-sized integers.
1712 (define_mode_attr VEL_INT [(VNx16QI "QI")
1713 (VNx8HI "HI") (VNx8HF "HI") (VNx8BF "HI")
1714 (VNx4SI "SI") (VNx4SF "SI")
1715 (VNx2DI "DI") (VNx2DF "DI")])
1717 ;; Gives the mode of the 128-bit lowpart of an SVE vector.
1718 (define_mode_attr V128 [(VNx16QI "V16QI")
1719 (VNx8HI "V8HI") (VNx8HF "V8HF") (VNx8BF "V8BF")
1720 (VNx4SI "V4SI") (VNx4SF "V4SF")
1721 (VNx2DI "V2DI") (VNx2DF "V2DF")])
1723 ;; ...and again in lower case.
1724 (define_mode_attr v128 [(VNx16QI "v16qi")
1725 (VNx8HI "v8hi") (VNx8HF "v8hf") (VNx8BF "v8bf")
1726 (VNx4SI "v4si") (VNx4SF "v4sf")
1727 (VNx2DI "v2di") (VNx2DF "v2df")])
1729 (define_mode_attr vnx [(V4SI "vnx4si") (V2DI "vnx2di")])
1731 ;; 64-bit container modes the inner or scalar source mode.
1732 (define_mode_attr VCOND [(HI "V4HI") (SI "V2SI")
1733 (V4HI "V4HI") (V8HI "V4HI")
1734 (V2SI "V2SI") (V4SI "V2SI")
1735 (DI "DI") (V2DI "DI")
1736 (V4HF "V4HF") (V8HF "V4HF")
1737 (V2SF "V2SF") (V4SF "V2SF")
1740 ;; 128-bit container modes the inner or scalar source mode.
1741 (define_mode_attr VCONQ [(V8QI "V16QI") (V16QI "V16QI")
1742 (V4HI "V8HI") (V8HI "V8HI")
1743 (V2SI "V4SI") (V4SI "V4SI")
1744 (DI "V2DI") (V2DI "V2DI")
1745 (V4HF "V8HF") (V8HF "V8HF")
1746 (V4BF "V8BF") (V8BF "V8BF")
1747 (V2SF "V4SF") (V4SF "V4SF")
1748 (V2DF "V2DF") (SI "V4SI")
1749 (HI "V8HI") (QI "V16QI")
1750 (SF "V4SF") (DF "V2DF")])
1752 ;; Half modes of all vector modes.
1753 (define_mode_attr VHALF [(V8QI "V4QI") (V16QI "V8QI")
1754 (V4HI "V2HI") (V8HI "V4HI")
1755 (V2SI "SI") (V4SI "V2SI")
1756 (V2DI "DI") (V2SF "SF")
1757 (V4SF "V2SF") (V4HF "V2HF")
1758 (V8HF "V4HF") (V2DF "DF")
1760 (VNx16QI "VNx8QI") (VNx8QI "VNx4QI")
1762 (VNx8HI "VNx4HI") (VNx4HI "VNx2HI")
1763 (VNx8HF "VNx4HF") (VNx4HF "VNx2HF")
1764 (VNx8BF "VNx4BF") (VNx4BF "VNx2BF")
1765 (VNx4SI "VNx2SI") (VNx4SF "VNx2SF")])
1767 ;; Half modes of all vector modes, in lower-case.
1768 (define_mode_attr Vhalf [(V8QI "v4qi") (V16QI "v8qi")
1769 (V4HI "v2hi") (V8HI "v4hi")
1770 (V8HF "v4hf") (V8BF "v4bf")
1771 (V2SI "si") (V4SI "v2si")
1772 (V2DI "di") (V2SF "sf")
1773 (V4SF "v2sf") (V2DF "df")
1774 (VNx16QI "vnx8qi") (VNx8QI "vnx4qi")
1776 (VNx8HI "vnx4hi") (VNx4HI "vnx2hi")
1777 (VNx8HF "vnx4hf") (VNx4HF "vnx2hf")
1778 (VNx8BF "vnx4bf") (VNx4BF "vnx2bf")
1779 (VNx4SI "vnx2si") (VNx4SF "vnx2sf")])
1781 ;; Quad modes of all vector modes, in lower-case.
1782 (define_mode_attr Vquad [(VNx16QI "vnx4qi") (VNx8QI "vnx2qi")
1783 (VNx8HI "vnx2hi") (VNx8HF "vnx2hf")
1786 ;; Single-element half modes of quad vector modes.
1787 (define_mode_attr V1HALF [(V2DI "V1DI") (V2DF "V1DF")])
1789 ;; Single-element half modes of quad vector modes, in lower-case
1790 (define_mode_attr V1half [(V2DI "v1di") (V2DF "v1df")])
1792 ;; Double modes of vector modes.
1793 (define_mode_attr VDBL [(V8QI "V16QI") (V4HI "V8HI")
1794 (V4HF "V8HF") (V4BF "V8BF")
1795 (V2SI "V4SI") (V2SF "V4SF")
1796 (SI "V2SI") (SF "V2SF")
1797 (DI "V2DI") (DF "V2DF")])
1799 ;; Load/store pair mode.
1800 (define_mode_attr VPAIR [(SI "V2x4QI") (DI "V2x8QI")])
1802 ;; Register suffix for double-length mode.
1803 (define_mode_attr Vdtype [(V4HF "8h") (V2SF "4s")])
1805 ;; Double modes of vector modes (lower case).
1806 (define_mode_attr Vdbl [(V8QI "v16qi") (V4HI "v8hi")
1807 (V4HF "v8hf") (V4BF "v8bf")
1808 (V2SI "v4si") (V2SF "v4sf")
1809 (SI "v2si") (DI "v2di")
1812 ;; Modes with double-width elements.
1813 (define_mode_attr VDBLW [(V8QI "V4HI") (V16QI "V8HI")
1814 (V4HI "V2SI") (V8HI "V4SI")
1815 (V2SI "DI") (V4SI "V2DI")])
1817 (define_mode_attr VQUADW [(V8QI "V4SI") (V16QI "V8SI")
1818 (V4HI "V2DI") (V8HI "V4DI")])
1820 ;; Narrowed modes for VDN.
1821 (define_mode_attr VNARROWD [(V4HI "V8QI") (V2SI "V4HI")
1823 (define_mode_attr Vnarrowd [(V4HI "v8qi") (V2SI "v4hi")
1826 ;; Narrowed double-modes for VQN (Used for XTN).
1827 (define_mode_attr VNARROWQ [(V8HI "V8QI") (V4SI "V4HI")
1831 (define_mode_attr Vnarrowq [(V8HI "v8qi") (V4SI "v4hi")
1834 ;; Narrowed quad-modes for VQN (Used for XTN2).
1835 (define_mode_attr VNARROWQ2 [(V8HI "V16QI") (V4SI "V8HI")
1837 (define_mode_attr Vnarrowq2 [(V8HI "v16qi") (V4SI "v8hi")
1840 ;; Narrowed modes of vector modes.
1841 (define_mode_attr VNARROW [(VNx8HI "VNx16QI")
1842 (VNx4SI "VNx8HI") (VNx4SF "VNx8HF")
1843 (VNx2DI "VNx4SI") (VNx2DF "VNx4SF")
1844 (VNx8SI "VNx8HI") (VNx16SI "VNx16QI")
1847 ;; Register suffix narrowed modes for VQN.
1848 (define_mode_attr Vntype [(V8HI "8b") (V4SI "4h")
1851 ;; Register suffix narrowed modes for VQN.
1852 (define_mode_attr V2ntype [(V8HI "16b") (V4SI "8h")
1855 ;; The result of FCVTN on two vectors of the given mode. The result has
1856 ;; twice as many QI elements as the input.
1857 (define_mode_attr VPACKB [(V4HF "V8QI") (V8HF "V16QI") (V4SF "V8QI")])
1858 (define_mode_attr VPACKBtype [(V4HF "8b") (V8HF "16b") (V4SF "8b")])
1860 ;; Modes narrowed all the way to bytes.
1861 (define_mode_attr VNARROWB [(V4HF "V8QI") (V8HF "V16QI")
1862 (V2SF "V8QI") (V4SF "V16QI")])
1864 ;; Register suffix for modes narrowed to bytes.
1865 (define_mode_attr Vnbtype [(V4HF "8b") (V8HF "16b")
1866 (V2SF "8b") (V4SF "16b")])
1868 ;; Register suffix representing one group of byte elements per wider element.
1869 (define_mode_attr Vnbsubtype [(V4HF "2b") (V8HF "2b")
1870 (V2SF "4b") (V4SF "4b")])
1872 ;; Widened modes of vector modes.
1873 (define_mode_attr VWIDE [(V8QI "V8HI") (V4HI "V4SI")
1874 (V2SI "V2DI") (V16QI "V8HI")
1875 (V8HI "V4SI") (V4SI "V2DI")
1877 (V8HF "V4SF") (V4SF "V2DF")
1878 (V4HF "V4SF") (V2SF "V2DF")
1879 (VNx8HF "VNx4SF") (VNx4SF "VNx2DF")
1880 (VNx16QI "VNx8HI") (VNx8HI "VNx4SI")
1882 (VNx16BI "VNx8BI") (VNx8BI "VNx4BI")
1885 ;; Modes with the same number of elements but strictly 2x the width.
1886 (define_mode_attr V2XWIDE [(V8QI "V8HI") (V4HI "V4SI")
1887 (V16QI "V16HI") (V8HI "V8SI")
1888 (V2SI "V2DI") (V4SI "V4DI")
1889 (V2DI "V2TI") (DI "TI")
1898 (define_mode_attr v2xwide [(V8QI "v8hi") (V4HI "v4si")
1899 (V16QI "v16hi") (V8HI "v8si")
1900 (V2SI "v2di") (V4SI "v4di")
1901 (V2DI "v2ti") (DI "ti")
1910 ;; Predicate mode associated with VWIDE.
1911 (define_mode_attr VWIDE_PRED [(VNx8HF "VNx4BI") (VNx4SF "VNx2BI")])
1913 ;; Widened modes of vector modes, lowercase
1914 (define_mode_attr Vwide [(V2SF "v2df") (V4HF "v4sf")
1915 (VNx16QI "vnx8hi") (VNx8HI "vnx4si")
1917 (VNx8HF "vnx4sf") (VNx4SF "vnx2df")
1918 (VNx16BI "vnx8bi") (VNx8BI "vnx4bi")
1921 ;; Widened mode register suffixes for VD_BHSI/VQW/VQ_HSF.
1922 (define_mode_attr Vwtype [(V8QI "8h") (V4HI "4s")
1923 (V2SI "2d") (V16QI "8h")
1924 (V8HI "4s") (V4SI "2d")
1925 (V8HF "4s") (V4SF "2d")])
1927 ;; Widened scalar register suffixes.
1928 (define_mode_attr Vwstype [(V8QI "h") (V4HI "s")
1929 (V2SI "") (V16QI "h")
1930 (V8HI "s") (V4SI "d")])
1931 ;; Add a .1d for V2SI.
1932 (define_mode_attr Vwsuf [(V8QI "") (V4HI "")
1933 (V2SI ".1d") (V16QI "")
1934 (V8HI "") (V4SI "")])
1936 ;; Scalar mode of widened vector reduction.
1937 (define_mode_attr VWIDE_S [(V8QI "HI") (V4HI "SI")
1938 (V2SI "DI") (V16QI "HI")
1939 (V8HI "SI") (V4SI "DI")])
1941 (define_mode_attr VWIDE2X_S [(V8QI "SI") (V4HI "DI")
1942 (V16QI "SI") (V8HI "DI")])
1944 ;; Widened mode with half the element register suffixes for VD_BHSI/VQW/VQ_HSF.
1945 (define_mode_attr Vwhalf [(V8QI "4h") (V4HI "2s")
1946 (V2SI "1d") (V16QI "8h")
1947 (V8HI "4s") (V4SI "2d")])
1949 ;; SVE vector after narrowing.
1950 (define_mode_attr Ventype [(VNx8HI "b")
1951 (VNx4SI "h") (VNx4SF "h")
1952 (VNx2DI "s") (VNx2DF "s")
1953 (VNx8SI "h") (VNx16SI "b")
1956 ;; SVE vector after widening.
1957 (define_mode_attr Vewtype [(VNx16QI "h")
1958 (VNx8HI "s") (VNx8HF "s")
1959 (VNx4SI "d") (VNx4SF "d")
1962 ;; Widened mode register suffixes for VDW/VQW.
1963 (define_mode_attr Vmwtype [(V8QI ".8h") (V4HI ".4s")
1964 (V2SI ".2d") (V16QI ".8h")
1965 (V8HI ".4s") (V4SI ".2d")
1966 (V4HF ".4s") (V2SF ".2d")
1969 ;; Lower part register suffixes for VQW/VQ_HSF.
1970 (define_mode_attr Vhalftype [(V16QI "8b") (V8HI "4h")
1971 (V4SI "2s") (V8HF "4h")
1974 ;; Whether a mode fits in W or X registers (i.e. "w" for 32-bit modes
1975 ;; and "x" for 64-bit modes).
1976 (define_mode_attr single_wx [(SI "w") (SF "w")
1977 (V8QI "x") (V4HI "x")
1978 (V4HF "x") (V4BF "x")
1979 (V2SI "x") (V2SF "x")
1982 ;; Whether a mode fits in S or D registers (i.e. "s" for 32-bit modes
1983 ;; and "d" for 64-bit modes).
1984 (define_mode_attr single_type [(SI "s") (SF "s")
1985 (V8QI "d") (V4HI "d")
1986 (V4HF "d") (V4BF "d")
1987 (V2SI "d") (V2SF "d")
1990 ;; Whether a double-width mode fits in D or Q registers (i.e. "d" for
1991 ;; 32-bit modes and "q" for 64-bit modes).
1992 (define_mode_attr single_dtype [(SI "d") (SF "d")
1993 (V8QI "q") (V4HI "q")
1994 (V4HF "q") (V4BF "q")
1995 (V2SI "q") (V2SF "q")
1998 ;; Define corresponding core/FP element mode for each vector mode.
1999 (define_mode_attr vw [(V8QI "w") (V16QI "w")
2000 (V4HI "w") (V8HI "w")
2001 (V2SI "w") (V4SI "w")
2003 (V2SF "s") (V4SF "s")
2006 ;; Corresponding core element mode for each vector mode. This is a
2007 ;; variation on <vw> mapping FP modes to GP regs.
2008 (define_mode_attr vwcore [(V8QI "w") (V16QI "w")
2009 (V4HI "w") (V8HI "w")
2010 (V2SI "w") (V4SI "w")
2012 (V4HF "w") (V8HF "w")
2013 (V4BF "w") (V8BF "w")
2014 (V2SF "w") (V4SF "w")
2016 (VNx16QI "w") (VNx8QI "w") (VNx4QI "w") (VNx2QI "w")
2017 (VNx8HI "w") (VNx4HI "w") (VNx2HI "w")
2018 (VNx8HF "w") (VNx4HF "w") (VNx2HF "w")
2019 (VNx8BF "w") (VNx4BF "w") (VNx2BF "w")
2020 (VNx4SI "w") (VNx2SI "w")
2021 (VNx4SF "w") (VNx2SF "w")
2025 ;; Like vwcore, but for the container mode rather than the element mode.
2026 (define_mode_attr vccore [(VNx16QI "w") (VNx8QI "w") (VNx4QI "w") (VNx2QI "x")
2027 (VNx8HI "w") (VNx4HI "w") (VNx2HI "x")
2028 (VNx4SI "w") (VNx2SI "x")
2031 ;; Double vector types for ALLX.
2032 (define_mode_attr Vallxd [(QI "8b") (HI "4h") (SI "2s")])
2034 ;; Mode with floating-point values replaced by like-sized integers.
2035 (define_mode_attr V_INT_EQUIV [(V8QI "V8QI") (V16QI "V16QI")
2036 (V4HI "V4HI") (V8HI "V8HI")
2037 (V2SI "V2SI") (V4SI "V4SI")
2038 (DI "DI") (V2DI "V2DI")
2039 (V4HF "V4HI") (V8HF "V8HI")
2040 (V4BF "V4HI") (V8BF "V8HI")
2041 (V2SF "V2SI") (V4SF "V4SI")
2042 (DF "DI") (V2DF "V2DI")
2046 (VNx8HI "VNx8HI") (VNx8HF "VNx8HI")
2048 (VNx4SI "VNx4SI") (VNx4SF "VNx4SI")
2049 (VNx2DI "VNx2DI") (VNx2DF "VNx2DI")
2050 (VNx8SF "VNx8SI") (VNx16SF "VNx16SI")
2053 ;; Lower case mode with floating-point values replaced by like-sized integers.
2054 (define_mode_attr v_int_equiv [(V8QI "v8qi") (V16QI "v16qi")
2055 (V4HI "v4hi") (V8HI "v8hi")
2056 (V2SI "v2si") (V4SI "v4si")
2057 (DI "di") (V2DI "v2di")
2058 (V4HF "v4hi") (V8HF "v8hi")
2059 (V4BF "v4hi") (V8BF "v8hi")
2060 (V2SF "v2si") (V4SF "v4si")
2061 (DF "di") (V2DF "v2di")
2064 (VNx8HI "vnx8hi") (VNx8HF "vnx8hi")
2066 (VNx4SI "vnx4si") (VNx4SF "vnx4si")
2067 (VNx2DI "vnx2di") (VNx2DF "vnx2di")
2068 (VNx8SF "vnx8si") (VNx16SF "vnx16si")
2071 ;; Mode with floating-point values replaced by 128-bit vector integers.
2072 (define_mode_attr VQ_INT_EQUIV [(DF "V2DI") (SF "V4SI")
2075 ;; Lower case mode with floating-point values replaced by 128-bit vector integers.
2076 (define_mode_attr vq_int_equiv [(DF "v2di") (SF "v4si")
2079 ;; Maps full and partial vector modes of any element type to a full-vector
2080 ;; integer mode with the same number of units.
2081 (define_mode_attr V_INT_CONTAINER [(VNx16QI "VNx16QI") (VNx8QI "VNx8HI")
2082 (VNx4QI "VNx4SI") (VNx2QI "VNx2DI")
2083 (VNx8HI "VNx8HI") (VNx4HI "VNx4SI")
2085 (VNx4SI "VNx4SI") (VNx2SI "VNx2DI")
2087 (VNx8HF "VNx8HI") (VNx4HF "VNx4SI")
2089 (VNx8BF "VNx8HI") (VNx4BF "VNx4SI")
2091 (VNx4SF "VNx4SI") (VNx2SF "VNx2DI")
2094 ;; Lower-case version of V_INT_CONTAINER.
2095 (define_mode_attr v_int_container [(VNx16QI "vnx16qi") (VNx8QI "vnx8hi")
2096 (VNx4QI "vnx4si") (VNx2QI "vnx2di")
2097 (VNx8HI "vnx8hi") (VNx4HI "vnx4si")
2099 (VNx4SI "vnx4si") (VNx2SI "vnx2di")
2101 (VNx8HF "vnx8hi") (VNx4HF "vnx4si")
2103 (VNx8BF "vnx8hi") (VNx4BF "vnx4si")
2105 (VNx4SF "vnx4si") (VNx2SF "vnx2di")
2108 ;; Lower case element modes (as used in shift immediate patterns).
2109 (define_mode_attr ve_mode [(V8QI "qi") (V16QI "qi")
2110 (V4HI "hi") (V8HI "hi")
2111 (V2SI "si") (V4SI "si")
2112 (DI "di") (V2DI "di")
2116 ;; Like ve_mode but for the half-width modes.
2117 (define_mode_attr vn_mode [(V8HI "qi") (V4SI "hi") (V2DI "si")])
2119 ;; Vm for lane instructions is restricted to FP_LO_REGS.
2120 (define_mode_attr vwx [(V4HI "x") (V8HI "x") (HI "x")
2121 (V2SI "w") (V4SI "w") (SI "w")])
2123 (define_mode_attr Vendreg [(OI "T") (CI "U") (XI "V")
2124 (V2x8QI "T") (V2x16QI "T")
2125 (V2x4HI "T") (V2x8HI "T")
2126 (V2x2SI "T") (V2x4SI "T")
2127 (V2x1DI "T") (V2x2DI "T")
2128 (V2x4HF "T") (V2x8HF "T")
2129 (V2x2SF "T") (V2x4SF "T")
2130 (V2x1DF "T") (V2x2DF "T")
2131 (V2x4BF "T") (V2x8BF "T")
2132 (V3x8QI "U") (V3x16QI "U")
2133 (V3x4HI "U") (V3x8HI "U")
2134 (V3x2SI "U") (V3x4SI "U")
2135 (V3x1DI "U") (V3x2DI "U")
2136 (V3x4HF "U") (V3x8HF "U")
2137 (V3x2SF "U") (V3x4SF "U")
2138 (V3x1DF "U") (V3x2DF "U")
2139 (V3x4BF "U") (V3x8BF "U")
2140 (V4x8QI "V") (V4x16QI "V")
2141 (V4x4HI "V") (V4x8HI "V")
2142 (V4x2SI "V") (V4x4SI "V")
2143 (V4x1DI "V") (V4x2DI "V")
2144 (V4x4HF "V") (V4x8HF "V")
2145 (V4x2SF "V") (V4x4SF "V")
2146 (V4x1DF "V") (V4x2DF "V")
2147 (V4x4BF "V") (V4x8BF "V")
2149 (VNx32QI "T") (VNx16HI "T")
2150 (VNx8SI "T") (VNx4DI "T")
2151 (VNx16BF "T") (VNx16HF "T")
2152 (VNx8SF "T") (VNx4DF "T")
2154 (VNx48QI "U") (VNx24HI "U")
2155 (VNx12SI "U") (VNx6DI "U")
2156 (VNx24BF "U") (VNx24HF "U")
2157 (VNx12SF "U") (VNx6DF "U")
2159 (VNx64QI "V") (VNx32HI "V")
2160 (VNx16SI "V") (VNx8DI "V")
2161 (VNx32BF "V") (VNx32HF "V")
2162 (VNx16SF "V") (VNx8DF "V")])
2164 ;; This is both the number of Q-Registers needed to hold the corresponding
2165 ;; opaque large integer mode, and the number of elements touched by the
2166 ;; ld..._lane and st..._lane operations.
2167 (define_mode_attr nregs [(OI "2") (CI "3") (XI "4")
2168 (V2x8QI "2") (V2x16QI "2")
2169 (V2x4HI "2") (V2x8HI "2")
2170 (V2x2SI "2") (V2x4SI "2")
2171 (V2x1DI "2") (V2x2DI "2")
2172 (V2x4HF "2") (V2x8HF "2")
2173 (V2x2SF "2") (V2x4SF "2")
2174 (V2x1DF "2") (V2x2DF "2")
2175 (V2x4BF "2") (V2x8BF "2")
2176 (V3x8QI "3") (V3x16QI "3")
2177 (V3x4HI "3") (V3x8HI "3")
2178 (V3x2SI "3") (V3x4SI "3")
2179 (V3x1DI "3") (V3x2DI "3")
2180 (V3x4HF "3") (V3x8HF "3")
2181 (V3x2SF "3") (V3x4SF "3")
2182 (V3x1DF "3") (V3x2DF "3")
2183 (V3x4BF "3") (V3x8BF "3")
2184 (V4x8QI "4") (V4x16QI "4")
2185 (V4x4HI "4") (V4x8HI "4")
2186 (V4x2SI "4") (V4x4SI "4")
2187 (V4x1DI "4") (V4x2DI "4")
2188 (V4x4HF "4") (V4x8HF "4")
2189 (V4x2SF "4") (V4x4SF "4")
2190 (V4x1DF "4") (V4x2DF "4")
2191 (V4x4BF "4") (V4x8BF "4")])
2193 ;; Mode for atomic operation suffixes
2194 (define_mode_attr atomic_sfx
2195 [(QI "b") (HI "h") (SI "") (DI "")])
2197 (define_mode_attr fcvt_target [(V2DF "v2di") (V4SF "v4si") (V2SF "v2si")
2198 (V2DI "v2df") (V4SI "v4sf") (V2SI "v2sf")
2199 (SF "si") (DF "di") (SI "sf") (DI "df")
2200 (V4HF "v4hi") (V8HF "v8hi") (V4HI "v4hf")
2201 (V8HI "v8hf") (HF "hi") (HI "hf")])
2202 (define_mode_attr FCVT_TARGET [(V2DF "V2DI") (V4SF "V4SI") (V2SF "V2SI")
2203 (V2DI "V2DF") (V4SI "V4SF") (V2SI "V2SF")
2204 (SF "SI") (DF "DI") (SI "SF") (DI "DF")
2205 (V4HF "V4HI") (V8HF "V8HI") (V4HI "V4HF")
2206 (V8HI "V8HF") (HF "HI") (HI "HF")])
2209 ;; for the inequal width integer to fp conversions
2210 (define_mode_attr fcvt_iesize [(HF "di") (SF "di") (DF "si")])
2211 (define_mode_attr FCVT_IESIZE [(HF "DI") (SF "DI") (DF "SI")])
2213 (define_mode_attr VSWAP_WIDTH [(V8QI "V16QI") (V16QI "V8QI")
2214 (V4HI "V8HI") (V8HI "V4HI")
2215 (V8BF "V4BF") (V4BF "V8BF")
2216 (V2SI "V4SI") (V4SI "V2SI")
2217 (DI "V2DI") (V2DI "DI")
2218 (V2SF "V4SF") (V4SF "V2SF")
2219 (V4HF "V8HF") (V8HF "V4HF")
2220 (DF "V2DF") (V2DF "DF")])
2222 (define_mode_attr vswap_width_name [(V8QI "to_128") (V16QI "to_64")
2223 (V4HI "to_128") (V8HI "to_64")
2224 (V2SI "to_128") (V4SI "to_64")
2225 (DI "to_128") (V2DI "to_64")
2226 (V4HF "to_128") (V8HF "to_64")
2227 (V2SF "to_128") (V4SF "to_64")
2228 (V4BF "to_128") (V8BF "to_64")
2229 (DF "to_128") (V2DF "to_64")])
2231 ;; For certain vector-by-element multiplication instructions we must
2232 ;; constrain the 16-bit cases to use only V0-V15. This is covered by
2233 ;; the 'x' constraint. All other modes may use the 'w' constraint.
2234 (define_mode_attr h_con [(V2SI "w") (V4SI "w")
2235 (V4HI "x") (V8HI "x")
2236 (V4HF "x") (V8HF "x")
2237 (V2SF "w") (V4SF "w")
2238 (V2DF "w") (DF "w")])
2240 ;; Defined to 'f' for types whose element type is a float type.
2241 (define_mode_attr f [(V8QI "") (V16QI "")
2245 (V4HF "f") (V8HF "f")
2246 (V2SF "f") (V4SF "f")
2247 (V2DF "f") (DF "f")])
2249 ;; Defined to '_fp' for types whose element type is a float type.
2250 (define_mode_attr fp [(V8QI "") (V16QI "")
2254 (V4HF "_fp") (V8HF "_fp")
2255 (V2SF "_fp") (V4SF "_fp")
2256 (V2DF "_fp") (DF "_fp")
2259 ;; Defined to '_q' for 128-bit types.
2260 (define_mode_attr q [(V8QI "") (V16QI "_q")
2261 (V4HI "") (V8HI "_q")
2262 (V4BF "") (V8BF "_q")
2263 (V2SI "") (V4SI "_q")
2265 (V4HF "") (V8HF "_q")
2266 (V4BF "") (V8BF "_q")
2267 (V2SF "") (V4SF "_q")
2269 (QI "") (HI "") (SI "") (DI "") (HF "") (SF "") (DF "")
2270 (V2x8QI "") (V2x16QI "_q")
2271 (V2x4HI "") (V2x8HI "_q")
2272 (V2x2SI "") (V2x4SI "_q")
2273 (V2x1DI "") (V2x2DI "_q")
2274 (V2x4HF "") (V2x8HF "_q")
2275 (V2x2SF "") (V2x4SF "_q")
2276 (V2x1DF "") (V2x2DF "_q")
2277 (V2x4BF "") (V2x8BF "_q")
2278 (V3x8QI "") (V3x16QI "_q")
2279 (V3x4HI "") (V3x8HI "_q")
2280 (V3x2SI "") (V3x4SI "_q")
2281 (V3x1DI "") (V3x2DI "_q")
2282 (V3x4HF "") (V3x8HF "_q")
2283 (V3x2SF "") (V3x4SF "_q")
2284 (V3x1DF "") (V3x2DF "_q")
2285 (V3x4BF "") (V3x8BF "_q")
2286 (V4x8QI "") (V4x16QI "_q")
2287 (V4x4HI "") (V4x8HI "_q")
2288 (V4x2SI "") (V4x4SI "_q")
2289 (V4x1DI "") (V4x2DI "_q")
2290 (V4x4HF "") (V4x8HF "_q")
2291 (V4x2SF "") (V4x4SF "_q")
2292 (V4x1DF "") (V4x2DF "_q")
2293 (V4x4BF "") (V4x8BF "_q")])
2295 ;; Equivalent of the "q" attribute for the <VDBL> mode.
2296 (define_mode_attr dblq [(SI "") (SF "")
2297 (V8QI "_q") (V4HI "_q")
2298 (V4HF "_q") (V4BF "_q")
2299 (V2SI "_q") (V2SF "_q")
2300 (DI "_q") (DF "_q")])
2302 (define_mode_attr vp [(V8QI "v") (V16QI "v")
2303 (V4HI "v") (V8HI "v")
2304 (V2SI "p") (V4SI "v")
2305 (V2DI "p") (V2DF "p")
2306 (V2SF "p") (V4SF "v")
2307 (V4HF "v") (V8HF "v")])
2309 (define_mode_attr vsi2qi [(V2SI "v8qi") (V4SI "v16qi")
2310 (VNx4SI "vnx16qi") (VNx2DI "vnx8hi")])
2311 (define_mode_attr VSI2QI [(V2SI "V8QI") (V4SI "V16QI")
2312 (VNx4SI "VNx16QI") (VNx2DI "VNx8HI")])
2315 ;; Register suffix for DOTPROD input types from the return type.
2316 (define_mode_attr Vdottype [(V2SI "8b") (V4SI "16b")])
2318 ;; Register suffix for BFDOT input types from the return type.
2319 (define_mode_attr Vbfdottype [(V2SF "4h") (V4SF "8h")])
2321 ;; Sum of lengths of instructions needed to move vector registers of a mode.
2322 (define_mode_attr insn_count [(OI "8") (CI "12") (XI "16")
2323 (V2x8QI "8") (V2x16QI "8")
2324 (V2x4HI "8") (V2x8HI "8")
2325 (V2x2SI "8") (V2x4SI "8")
2326 (V2x1DI "8") (V2x2DI "8")
2327 (V2x4HF "8") (V2x8HF "8")
2328 (V2x2SF "8") (V2x4SF "8")
2329 (V2x1DF "8") (V2x2DF "8")
2330 (V2x4BF "8") (V2x8BF "8")
2331 (V3x8QI "12") (V3x16QI "12")
2332 (V3x4HI "12") (V3x8HI "12")
2333 (V3x2SI "12") (V3x4SI "12")
2334 (V3x1DI "12") (V3x2DI "12")
2335 (V3x4HF "12") (V3x8HF "12")
2336 (V3x2SF "12") (V3x4SF "12")
2337 (V3x1DF "12") (V3x2DF "12")
2338 (V3x4BF "12") (V3x8BF "12")
2339 (V4x8QI "16") (V4x16QI "16")
2340 (V4x4HI "16") (V4x8HI "16")
2341 (V4x2SI "16") (V4x4SI "16")
2342 (V4x1DI "16") (V4x2DI "16")
2343 (V4x4HF "16") (V4x8HF "16")
2344 (V4x2SF "16") (V4x4SF "16")
2345 (V4x1DF "16") (V4x2DF "16")
2346 (V4x4BF "16") (V4x8BF "16")])
2348 ;; -fpic small model GOT reloc modifers: gotpage_lo15/lo14 for ILP64/32.
2349 ;; No need of iterator for -fPIC as it use got_lo12 for both modes.
2350 (define_mode_attr got_modifier [(SI "gotpage_lo14") (DI "gotpage_lo15")])
2352 ;; Width of 2nd and 3rd arguments to fp16 vector multiply add/sub
2353 (define_mode_attr VFMLA_W [(V2SF "V4HF") (V4SF "V8HF")])
2355 ;; Width of 2nd and 3rd arguments to bf16 vector multiply add/sub
2356 (define_mode_attr VBFMLA_W [(V2SF "V4BF") (V4SF "V8BF")])
2358 (define_mode_attr VFMLA_SEL_W [(V2SF "V2HF") (V4SF "V4HF")])
2360 (define_mode_attr f16quad [(V2SF "") (V4SF "q")])
2362 (define_mode_attr isquadop [(V8QI "") (V16QI "q") (V4BF "") (V8BF "q")])
2364 (define_code_attr f16mac [(plus "a") (minus "s")])
2366 ;; Map smax to smin and umax to umin.
2367 (define_code_attr max_opp [(smax "smin") (umax "umin")])
2369 ;; Same as above, but louder.
2370 (define_code_attr MAX_OPP [(smax "SMIN") (umax "UMIN")])
2372 ;; Map smax and umax to sign_extend and zero_extend
2373 (define_code_attr USMAX_EXT [(smax "sign_extend") (umax "zero_extend")])
2375 ;; The number of subvectors in an SVE_STRUCT.
2376 (define_mode_attr vector_count [(VNx32QI "2") (VNx16HI "2")
2377 (VNx8SI "2") (VNx4DI "2")
2379 (VNx16HF "2") (VNx8SF "2") (VNx4DF "2")
2380 (VNx48QI "3") (VNx24HI "3")
2381 (VNx12SI "3") (VNx6DI "3")
2383 (VNx24HF "3") (VNx12SF "3") (VNx6DF "3")
2384 (VNx64QI "4") (VNx32HI "4")
2385 (VNx16SI "4") (VNx8DI "4")
2387 (VNx32HF "4") (VNx16SF "4") (VNx8DF "4")])
2389 ;; The number of instruction bytes needed for an SVE_STRUCT move. This is
2390 ;; equal to vector_count * 4.
2391 (define_mode_attr insn_length [(VNx32QI "8") (VNx16HI "8")
2392 (VNx8SI "8") (VNx4DI "8")
2394 (VNx16HF "8") (VNx8SF "8") (VNx4DF "8")
2395 (VNx48QI "12") (VNx24HI "12")
2396 (VNx12SI "12") (VNx6DI "12")
2398 (VNx24HF "12") (VNx12SF "12") (VNx6DF "12")
2399 (VNx64QI "16") (VNx32HI "16")
2400 (VNx16SI "16") (VNx8DI "16")
2402 (VNx32HF "16") (VNx16SF "16") (VNx8DF "16")])
2404 ;; The type of a subvector in an SVE_STRUCT.
2405 (define_mode_attr VSINGLE [(VNx16QI "VNx16QI")
2410 (VNx16HI "VNx8HI") (VNx16HF "VNx8HF")
2412 (VNx8SI "VNx4SI") (VNx8SF "VNx4SF")
2413 (VNx4DI "VNx2DI") (VNx4DF "VNx2DF")
2415 (VNx24HI "VNx8HI") (VNx24HF "VNx8HF")
2417 (VNx12SI "VNx4SI") (VNx12SF "VNx4SF")
2418 (VNx6DI "VNx2DI") (VNx6DF "VNx2DF")
2420 (VNx32HI "VNx8HI") (VNx32HF "VNx8HF")
2422 (VNx16SI "VNx4SI") (VNx16SF "VNx4SF")
2423 (VNx8DI "VNx2DI") (VNx8DF "VNx2DF")])
2425 ;; ...and again in lower case.
2426 (define_mode_attr vsingle [(VNx8HI "vnx8hi")
2428 (VNx16HI "vnx8hi") (VNx16HF "vnx8hf")
2430 (VNx8SI "vnx4si") (VNx8SF "vnx4sf")
2431 (VNx4DI "vnx2di") (VNx4DF "vnx2df")
2433 (VNx24HI "vnx8hi") (VNx24HF "vnx8hf")
2435 (VNx12SI "vnx4si") (VNx12SF "vnx4sf")
2436 (VNx6DI "vnx2di") (VNx6DF "vnx2df")
2438 (VNx32HI "vnx8hi") (VNx32HF "vnx8hf")
2440 (VNx16SI "vnx4si") (VNx16SF "vnx4sf")
2441 (VNx8DI "vnx2di") (VNx8DF "vnx2df")])
2443 ;; The predicate mode associated with an SVE data mode. For structure modes
2444 ;; this is equivalent to the <VPRED> of the subvector mode.
2445 (define_mode_attr VPRED [(VNx16QI "VNx16BI") (VNx8QI "VNx8BI")
2446 (VNx4QI "VNx4BI") (VNx2QI "VNx2BI")
2447 (VNx8HI "VNx8BI") (VNx4HI "VNx4BI") (VNx2HI "VNx2BI")
2448 (VNx8HF "VNx8BI") (VNx4HF "VNx4BI") (VNx2HF "VNx2BI")
2449 (VNx8BF "VNx8BI") (VNx4BF "VNx4BI") (VNx2BF "VNx2BI")
2450 (VNx4SI "VNx4BI") (VNx2SI "VNx2BI")
2451 (VNx4SF "VNx4BI") (VNx2SF "VNx2BI")
2456 (VNx16HI "VNx8BI") (VNx16HF "VNx8BI")
2458 (VNx8SI "VNx4BI") (VNx8SF "VNx4BI")
2459 (VNx4DI "VNx2BI") (VNx4DF "VNx2BI")
2461 (VNx24HI "VNx8BI") (VNx24HF "VNx8BI")
2463 (VNx12SI "VNx4BI") (VNx12SF "VNx4BI")
2464 (VNx6DI "VNx2BI") (VNx6DF "VNx2BI")
2466 (VNx32HI "VNx8BI") (VNx32HF "VNx8BI")
2468 (VNx16SI "VNx4BI") (VNx16SF "VNx4BI")
2469 (VNx8DI "VNx2BI") (VNx8DF "VNx2BI")
2470 (V8QI "VNx8BI") (V16QI "VNx16BI")
2471 (V4HI "VNx4BI") (V8HI "VNx8BI") (V2SI "VNx2BI")
2472 (V4SI "VNx4BI") (V2DI "VNx2BI") (V1DI "VNx2BI")
2473 (HF "VNx8BI") (SF "VNx4BI") (DF "VNx2BI")])
2475 ;; ...and again in lower case.
2476 (define_mode_attr vpred [(VNx16QI "vnx16bi") (VNx8QI "vnx8bi")
2477 (VNx4QI "vnx4bi") (VNx2QI "vnx2bi")
2478 (VNx8HI "vnx8bi") (VNx4HI "vnx4bi") (VNx2HI "vnx2bi")
2479 (VNx8HF "vnx8bi") (VNx4HF "vnx4bi") (VNx2HF "vnx2bi")
2480 (VNx8BF "vnx8bi") (VNx4BF "vnx4bi") (VNx2BF "vnx2bi")
2481 (VNx4SI "vnx4bi") (VNx2SI "vnx2bi")
2482 (VNx4SF "vnx4bi") (VNx2SF "vnx2bi")
2486 (VNx16HI "vnx8bi") (VNx16HF "vnx8bi")
2488 (VNx8SI "vnx4bi") (VNx8SF "vnx4bi")
2489 (VNx4DI "vnx2bi") (VNx4DF "vnx2bi")
2491 (VNx24HI "vnx8bi") (VNx24HF "vnx8bi")
2493 (VNx12SI "vnx4bi") (VNx12SF "vnx4bi")
2494 (VNx6DI "vnx2bi") (VNx6DF "vnx2bi")
2496 (VNx32HI "vnx8bi") (VNx32HF "vnx4bi")
2498 (VNx16SI "vnx4bi") (VNx16SF "vnx4bi")
2499 (VNx8DI "vnx2bi") (VNx8DF "vnx2bi")])
2501 (define_mode_attr VDOUBLE [(VNx16QI "VNx32QI")
2502 (VNx8HI "VNx16HI") (VNx8HF "VNx16HF")
2504 (VNx4SI "VNx8SI") (VNx4SF "VNx8SF")
2505 (VNx2DI "VNx4DI") (VNx2DF "VNx4DF")])
2507 (define_mode_attr VNxTI [(VNx32QI "VNx2TI") (VNx16HI "VNx2TI")
2508 (VNx8SI "VNx2TI") (VNx4DI "VNx2TI")
2509 (VNx16BF "VNx2TI") (VNx16HF "VNx2TI")
2510 (VNx8SF "VNx2TI") (VNx4DF "VNx2TI")
2512 (VNx48QI "VNx3TI") (VNx24HI "VNx3TI")
2513 (VNx12SI "VNx3TI") (VNx6DI "VNx3TI")
2514 (VNx24BF "VNx3TI") (VNx24HF "VNx3TI")
2515 (VNx12SF "VNx3TI") (VNx6DF "VNx3TI")
2517 (VNx64QI "VNx4TI") (VNx32HI "VNx4TI")
2518 (VNx16SI "VNx4TI") (VNx8DI "VNx4TI")
2519 (VNx32BF "VNx4TI") (VNx32HF "VNx4TI")
2520 (VNx16SF "VNx4TI") (VNx8DF "VNx4TI")])
2522 ;; The Advanced SIMD modes of popcount corresponding to scalar modes.
2523 (define_mode_attr VEC_POP_MODE [(QI "V8QI") (HI "V4HI")
2524 (SI "V2SI") (DI "V1DI")])
2526 ;; ...and again in lower case.
2527 (define_mode_attr vec_pop_mode [(QI "v8qi") (HI "v4hi")
2528 (SI "v2si") (DI "v1di")])
2530 ;; On AArch64 the By element instruction doesn't have a 2S variant.
2531 ;; However because the instruction always selects a pair of values
2532 ;; The normal 3SAME instruction can be used here instead.
2533 (define_mode_attr FCMLA_maybe_lane [(V2SF "<Vtype>") (V4SF "<Vetype>[%4]")
2534 (V4HF "<Vetype>[%4]") (V8HF "<Vetype>[%4]")
2537 (define_mode_attr za32_offset_range [(VNx16QI "0_to_12_step_4")
2538 (VNx8BF "0_to_14_step_2")
2539 (VNx8HF "0_to_14_step_2")
2540 (VNx8HI "0_to_14_step_2")
2541 (VNx32QI "0_to_4_step_4")
2542 (VNx16BF "0_to_6_step_2")
2543 (VNx16HF "0_to_6_step_2")
2544 (VNx16HI "0_to_6_step_2")
2545 (VNx64QI "0_to_4_step_4")
2546 (VNx32BF "0_to_6_step_2")
2547 (VNx32HF "0_to_6_step_2")
2548 (VNx32HI "0_to_6_step_2")])
2550 (define_mode_attr za64_offset_range [(VNx8HI "0_to_12_step_4")
2551 (VNx16HI "0_to_4_step_4")
2552 (VNx32HI "0_to_4_step_4")])
2554 (define_mode_attr za32_long [(VNx16QI "ll") (VNx32QI "ll") (VNx64QI "ll")
2555 (VNx8HI "l") (VNx16HI "l") (VNx32HI "l")])
2557 (define_mode_attr za32_last_offset [(VNx16QI "3") (VNx32QI "3") (VNx64QI "3")
2558 (VNx8HI "1") (VNx16HI "1") (VNx32HI "1")])
2560 (define_mode_attr vg_modifier [(VNx16QI "")
2571 (VNx32HI ", vgx4")])
2573 (define_mode_attr z_suffix [(VNx16QI ".b") (VNx32QI "") (VNx64QI "")
2574 (VNx8BF ".h") (VNx16BF "") (VNx32BF "")
2575 (VNx8HF ".h") (VNx16HF "") (VNx32HF "")
2576 (VNx8HI ".h") (VNx16HI "") (VNx32HI "")])
2578 ;; The number of bytes controlled by a predicate
2579 (define_mode_attr data_bytes [(VNx16BI "1") (VNx8BI "2")
2580 (VNx4BI "4") (VNx2BI "8")])
2582 ;; Two-nybble mask for partial vector modes: nunits, byte size.
2583 (define_mode_attr self_mask [(VNx8QI "0x81")
2590 ;; For SVE_HSDI vector modes, the mask of narrower modes, encoded as above.
2591 (define_mode_attr narrower_mask [(VNx8HI "0x81") (VNx4HI "0x41")
2593 (VNx4SI "0x43") (VNx2SI "0x23")
2596 ;; The constraint to use for an SVE [SU]DOT, FMUL, FMLA or FMLS lane index.
2597 (define_mode_attr sve_lane_con [(VNx8HI "y") (VNx4SI "y") (VNx2DI "x")
2599 (VNx8BF "y") (VNx8HF "y")
2600 (VNx4SF "y") (VNx2DF "x")])
2602 ;; The constraint to use for an SVE FCMLA lane index.
2603 (define_mode_attr sve_lane_pair_con [(VNx8HF "y") (VNx4SF "x")])
2605 (define_mode_attr vec_or_offset [(V8QI "vec") (V16QI "vec") (V4HI "vec")
2606 (V8HI "vec") (V2SI "vec") (V4SI "vec")
2607 (V2DI "vec") (DI "offset")])
2609 (define_mode_attr b [(V4BF "b") (V4HF "") (V8BF "b") (V8HF "")
2610 (VNx8BF "b") (VNx8HF "") (VNx4SF "") (VNx2DF "")
2611 (VNx16BF "b") (VNx16HF "") (VNx8SF "") (VNx4DF "")
2612 (VNx32BF "b") (VNx32HF "") (VNx16SF "") (VNx8DF "")])
2614 (define_mode_attr is_bf16 [(VNx8BF "true")
2619 (define_mode_attr aligned_operand [(VNx16QI "register_operand")
2620 (VNx8HI "register_operand")
2621 (VNx8BF "register_operand")
2622 (VNx8HF "register_operand")
2623 (VNx32QI "aligned_register_operand")
2624 (VNx16HI "aligned_register_operand")
2625 (VNx16BF "aligned_register_operand")
2626 (VNx16HF "aligned_register_operand")
2627 (VNx64QI "aligned_register_operand")
2628 (VNx32HI "aligned_register_operand")
2629 (VNx32BF "aligned_register_operand")
2630 (VNx32HF "aligned_register_operand")])
2632 (define_mode_attr aligned_fpr [(VNx16QI "w") (VNx8HI "w")
2633 (VNx8BF "w") (VNx8HF "w")
2634 (VNx32QI "Uw2") (VNx16HI "Uw2")
2635 (VNx16BF "Uw2") (VNx16HF "Uw2")
2636 (VNx64QI "Uw4") (VNx32HI "Uw4")
2637 (VNx32BF "Uw4") (VNx32HF "Uw4")])
2639 (define_mode_attr LD1_EXTENDQ_MEM [(VNx4SI "VNx1SI") (VNx4SF "VNx1SI")
2640 (VNx2DI "VNx1DI") (VNx2DF "VNx1DI")])
2642 ;; -------------------------------------------------------------------
2644 ;; -------------------------------------------------------------------
2646 ;; This code iterator allows the various shifts supported on the core
2647 (define_code_iterator SHIFT [ashift ashiftrt lshiftrt rotatert rotate])
2649 ;; This code iterator allows all shifts except for rotates.
2650 (define_code_iterator SHIFT_no_rotate [ashift ashiftrt lshiftrt])
2652 ;; This code iterator allows the shifts supported in arithmetic instructions
2653 (define_code_iterator ASHIFT [ashift ashiftrt lshiftrt])
2655 (define_code_iterator SHIFTRT [ashiftrt lshiftrt])
2657 ;; Code iterator for logical operations
2658 (define_code_iterator LOGICAL [and ior xor])
2660 ;; LOGICAL with plus, for when | gets converted to +.
2661 (define_code_iterator LOGICAL_OR_PLUS [and ior xor plus])
2663 ;; LOGICAL without AND.
2664 (define_code_iterator LOGICAL_OR [ior xor])
2666 ;; Code iterator for logical operations whose :nlogical works on SIMD registers.
2667 (define_code_iterator NLOGICAL [and ior])
2669 ;; Code iterator for unary negate and bitwise complement.
2670 (define_code_iterator NEG_NOT [neg not])
2672 ;; Code iterator for sign/zero extension
2673 (define_code_iterator ANY_EXTEND [sign_extend zero_extend])
2674 (define_code_iterator ANY_EXTEND2 [sign_extend zero_extend])
2676 ;; All division operations (signed/unsigned)
2677 (define_code_iterator ANY_DIV [div udiv])
2679 ;; Code iterator for sign/zero extraction
2680 (define_code_iterator ANY_EXTRACT [sign_extract zero_extract])
2682 ;; Code iterator for equality comparisons
2683 (define_code_iterator EQL [eq ne])
2685 ;; Code iterator for less-than and greater/equal-to
2686 (define_code_iterator LTGE [lt ge])
2688 ;; Iterator for __sync_<op> operations that where the operation can be
2689 ;; represented directly RTL. This is all of the sync operations bar
2691 (define_code_iterator atomic_op [plus minus ior xor and])
2693 ;; Iterator for integer conversions
2694 (define_code_iterator FIXUORS [fix unsigned_fix])
2696 ;; Iterator for float conversions
2697 (define_code_iterator FLOATUORS [float unsigned_float])
2699 ;; Code iterator for variants of vector max and min.
2700 (define_code_iterator MAXMIN [smax smin umax umin])
2702 ;; Code iterator for min/max ops but without UMAX.
2703 (define_code_iterator MAXMIN_NOUMAX [smax smin umin])
2705 (define_code_iterator FMAXMIN [smax smin])
2707 ;; Signed and unsigned max operations.
2708 (define_code_iterator USMAX [smax umax])
2710 ;; Code iterator for plus and minus.
2711 (define_code_iterator ADDSUB [plus minus])
2713 ;; Code iterator for variants of vector saturating binary ops.
2714 (define_code_iterator BINQOPS [ss_plus us_plus ss_minus us_minus])
2716 ;; Code iterator for variants of vector saturating unary ops.
2717 (define_code_iterator UNQOPS [ss_neg ss_abs])
2719 ;; Code iterator for signed variants of vector saturating binary ops.
2720 (define_code_iterator SBINQOPS [ss_plus ss_minus])
2722 ;; Code iterator for unsigned variants of vector saturating binary ops.
2723 (define_code_iterator UBINQOPS [us_plus us_minus])
2725 ;; Modular and saturating addition.
2726 (define_code_iterator ANY_PLUS [plus ss_plus us_plus])
2728 ;; Saturating addition.
2729 (define_code_iterator SAT_PLUS [ss_plus us_plus])
2731 ;; Modular and saturating subtraction.
2732 (define_code_iterator ANY_MINUS [minus ss_minus us_minus])
2734 ;; Saturating subtraction.
2735 (define_code_iterator SAT_MINUS [ss_minus us_minus])
2737 ;; Comparison operators for <F>CM.
2738 (define_code_iterator COMPARISONS [lt le eq ge gt])
2740 ;; Unsigned comparison operators.
2741 (define_code_iterator UCOMPARISONS [ltu leu geu gtu])
2743 ;; Unsigned comparison operators.
2744 (define_code_iterator FAC_COMPARISONS [lt le ge gt])
2746 ;; Signed and unsigned saturating truncations.
2747 (define_code_iterator SAT_TRUNC [ss_truncate us_truncate])
2749 (define_code_iterator ALL_TRUNC [ss_truncate us_truncate truncate])
2751 ;; SVE integer unary operations.
2752 (define_code_iterator SVE_INT_UNARY [abs neg not clrsb clz popcount
2754 (ss_abs "TARGET_SVE2")
2755 (ss_neg "TARGET_SVE2")])
2757 ;; SVE integer binary operations.
2758 (define_code_iterator SVE_INT_BINARY [plus minus mult smax umax smin umin
2759 ashift ashiftrt lshiftrt
2761 (ss_plus "TARGET_SVE2")
2762 (us_plus "TARGET_SVE2")
2763 (ss_minus "TARGET_SVE2")
2764 (us_minus "TARGET_SVE2")])
2766 ;; SVE integer binary division operations.
2767 (define_code_iterator SVE_INT_BINARY_SD [div udiv])
2769 ;; SVE integer binary operations that have an immediate form.
2770 (define_code_iterator SVE_INT_BINARY_IMM [mult smax smin umax umin])
2772 (define_code_iterator SVE_INT_BINARY_MULTI [smax smin umax umin])
2774 (define_code_iterator SVE_INT_BINARY_SINGLE [plus smax smin umax umin])
2776 ;; SVE floating-point operations with an unpredicated all-register form.
2777 (define_code_iterator SVE_UNPRED_FP_BINARY [plus minus mult])
2779 ;; SVE integer comparisons.
2780 (define_code_iterator SVE_INT_CMP [lt le eq ne ge gt ltu leu geu gtu])
2782 ;; -------------------------------------------------------------------
2784 ;; -------------------------------------------------------------------
2785 ;; Map rtl objects to optab names
2786 (define_code_attr optab [(ashift "ashl")
2791 (sign_extend "extend")
2792 (zero_extend "zero_extend")
2793 (sign_extract "extv")
2794 (zero_extract "extzv")
2796 (unsigned_fix "fixuns")
2798 (unsigned_float "floatuns")
2801 (popcount "popcount")
2835 (define_code_attr addsub [(ss_plus "add")
2840 (define_code_attr SHIFTEXTEND [(ashiftrt "sign_extend") (lshiftrt "zero_extend")])
2842 (define_code_attr TRUNCEXTEND [(ss_truncate "sign_extend")
2843 (us_truncate "zero_extend")
2844 (truncate "zero_extend")])
2846 ;; For comparison operators we use the FCM* and CM* instructions.
2847 ;; As there are no CMLE or CMLT instructions which act on 3 vector
2848 ;; operands, we must use CMGE or CMGT and swap the order of the
2851 (define_code_attr n_optab [(lt "gt") (le "ge") (eq "eq") (ge "ge") (gt "gt")
2852 (ltu "hi") (leu "hs") (geu "hs") (gtu "hi")])
2853 (define_code_attr cmp_1 [(lt "2") (le "2") (eq "1") (ge "1") (gt "1")
2854 (ltu "2") (leu "2") (geu "1") (gtu "1")])
2855 (define_code_attr cmp_2 [(lt "1") (le "1") (eq "2") (ge "2") (gt "2")
2856 (ltu "1") (leu "1") (geu "2") (gtu "2")])
2858 (define_code_attr CMP [(lt "LT") (le "LE") (eq "EQ") (ge "GE") (gt "GT")
2859 (ltu "LTU") (leu "LEU") (ne "NE") (geu "GEU")
2862 ;; The AArch64 condition associated with an rtl comparison code.
2863 (define_code_attr cmp_op [(lt "lt")
2874 (define_code_attr fix_trunc_optab [(fix "fix_trunc")
2875 (unsigned_fix "fixuns_trunc")])
2877 ;; Optab prefix for sign/zero-extending operations
2878 (define_code_attr su_optab [(sign_extend "") (zero_extend "u")
2880 (fix "") (unsigned_fix "u")
2881 (float "s") (unsigned_float "u")
2882 (ss_plus "s") (us_plus "u")
2883 (ss_minus "s") (us_minus "u")])
2885 ;; Similar for the instruction mnemonics
2886 (define_code_attr shift [(ashift "lsl") (ashiftrt "asr")
2887 (lshiftrt "lsr") (rotatert "ror") (rotate "ror")])
2888 ;; True if shift is rotate left.
2889 (define_code_attr is_rotl [(ashift "0") (ashiftrt "0")
2890 (lshiftrt "0") (rotatert "0") (rotate "1")])
2892 ;; Op prefix for shift right and accumulate.
2893 (define_code_attr sra_op [(ashiftrt "s") (lshiftrt "u")])
2895 ;; op prefix for shift right and narrow.
2896 (define_code_attr srn_op [(ashiftrt "r") (lshiftrt "")])
2898 (define_code_attr shrn_s [(ashiftrt "s") (lshiftrt "")])
2900 ;; Map shift operators onto underlying bit-field instructions
2901 (define_code_attr bfshift [(ashift "ubfiz") (ashiftrt "sbfx")
2902 (lshiftrt "ubfx") (rotatert "extr")])
2904 ;; Logical operator instruction mnemonics
2905 (define_code_attr logical [(and "and") (ior "orr") (xor "eor")])
2907 ;; Operation names for negate and bitwise complement.
2908 (define_code_attr neg_not_op [(neg "neg") (not "not")])
2910 ;; csinv, csneg insn suffixes.
2911 (define_code_attr neg_not_cs [(neg "neg") (not "inv")])
2913 ;; Similar, but when the second operand is inverted.
2914 (define_code_attr nlogical [(and "bic") (ior "orn") (xor "eon")])
2916 ;; Similar, but when both operands are inverted.
2917 (define_code_attr logical_nn [(and "nor") (ior "nand")])
2919 ;; Sign- or zero-extending data-op
2920 (define_code_attr su [(sign_extend "s") (zero_extend "u")
2921 (sign_extract "s") (zero_extract "u")
2922 (fix "s") (unsigned_fix "u")
2923 (div "s") (udiv "u")
2924 (smax "s") (umax "u")
2925 (smin "s") (umin "u")
2926 (ss_truncate "s") (us_truncate "u")])
2928 ;; "s" for signed ops, empty for unsigned ones.
2929 (define_code_attr s [(sign_extend "s") (zero_extend "")])
2931 ;; Map signed/unsigned ops to the corresponding extension.
2932 (define_code_attr paired_extend [(ss_plus "sign_extend")
2933 (us_plus "zero_extend")
2934 (ss_minus "sign_extend")
2935 (us_minus "zero_extend")])
2937 (define_code_attr TRUNC_SHIFT [(ss_truncate "ashiftrt")
2938 (us_truncate "lshiftrt") (truncate "lshiftrt")])
2940 (define_code_attr shrn_op [(ss_truncate "sq")
2941 (us_truncate "uq") (truncate "")])
2943 ;; Whether a shift is left or right.
2944 (define_code_attr lr [(ashift "l") (ashiftrt "r") (lshiftrt "r")])
2946 ;; Emit conditional branch instructions.
2947 (define_code_attr bcond [(eq "beq") (ne "bne") (lt "bne") (ge "beq")])
2949 ;; Emit cbz/cbnz depending on comparison type.
2950 (define_code_attr cbz [(eq "cbz") (ne "cbnz") (lt "cbnz") (ge "cbz")])
2952 ;; Emit inverted cbz/cbnz depending on comparison type.
2953 (define_code_attr inv_cb [(eq "cbnz") (ne "cbz") (lt "cbz") (ge "cbnz")])
2955 ;; Emit tbz/tbnz depending on comparison type.
2956 (define_code_attr tbz [(eq "tbz") (ne "tbnz") (lt "tbnz") (ge "tbz")])
2958 ;; Emit inverted tbz/tbnz depending on comparison type.
2959 (define_code_attr inv_tb [(eq "tbnz") (ne "tbz") (lt "tbz") (ge "tbnz")])
2961 ;; Max/min attributes.
2962 (define_code_attr maxmin [(smax "max")
2967 (define_code_attr maxminand [(smax "bic") (smin "and")])
2969 ;; MLA/MLS attributes.
2970 (define_code_attr as [(ss_plus "a") (ss_minus "s")])
2972 ;; Atomic operations
2973 (define_code_attr atomic_optab
2974 [(ior "or") (xor "xor") (and "and") (plus "add") (minus "sub")])
2976 (define_code_attr atomic_op_operand
2977 [(ior "aarch64_logical_operand")
2978 (xor "aarch64_logical_operand")
2979 (and "aarch64_logical_operand")
2980 (plus "aarch64_plus_operand")
2981 (minus "aarch64_plus_operand")])
2983 ;; Constants acceptable for atomic operations.
2984 ;; This definition must appear in this file before the iterators it refers to.
2985 (define_code_attr const_atomic
2986 [(plus "IJ") (minus "IJ")
2987 (xor "<lconst_atomic>") (ior "<lconst_atomic>")
2988 (and "<lconst_atomic>")])
2990 ;; Attribute to describe constants acceptable in atomic logical operations
2991 (define_mode_attr lconst_atomic [(QI "K") (HI "K") (SI "K") (DI "L")])
2993 ;; The integer SVE instruction that implements an rtx code.
2994 (define_code_attr sve_int_op [(plus "add")
3023 (define_code_attr sve_int_op_rev [(plus "add")
3041 (us_minus "uqsubr")])
3043 ;; The floating-point SVE instruction that implements an rtx code.
3044 (define_code_attr sve_fp_op [(plus "fadd")
3048 ;; The SVE immediate constraint to use for an rtl code.
3049 (define_code_attr sve_imm_con [(mult "vsm")
3065 ;; The prefix letter to use when printing an immediate operand.
3066 (define_code_attr sve_imm_prefix [(mult "")
3072 ;; The predicate to use for the second input operand in a cond_<optab><mode>
3074 (define_code_attr sve_pred_int_rhs2_operand
3075 [(plus "register_operand")
3076 (minus "register_operand")
3077 (mult "register_operand")
3078 (smax "register_operand")
3079 (umax "register_operand")
3080 (smin "register_operand")
3081 (umin "register_operand")
3082 (ashift "aarch64_sve_lshift_operand")
3083 (ashiftrt "aarch64_sve_rshift_operand")
3084 (lshiftrt "aarch64_sve_rshift_operand")
3085 (and "aarch64_sve_pred_and_operand")
3086 (ior "register_operand")
3087 (xor "register_operand")
3088 (ss_plus "register_operand")
3089 (us_plus "register_operand")
3090 (ss_minus "register_operand")
3091 (us_minus "register_operand")])
3093 (define_code_attr inc_dec [(minus "dec") (ss_minus "sqdec") (us_minus "uqdec")
3094 (plus "inc") (ss_plus "sqinc") (us_plus "uqinc")])
3096 ;; The predicated FP operation associated with each rtl code. This is only
3097 ;; useful for operations that have both predicated and unpredicated forms.
3098 (define_code_attr SVE_COND_FP [(plus "UNSPEC_COND_FADD")
3099 (minus "UNSPEC_COND_FSUB")
3100 (mult "UNSPEC_COND_FMUL")])
3102 ;; -------------------------------------------------------------------
3104 ;; -------------------------------------------------------------------
3106 (define_int_iterator MAXMINV [UNSPEC_UMAXV UNSPEC_UMINV
3107 UNSPEC_SMAXV UNSPEC_SMINV])
3109 (define_int_iterator FMAXMINV [UNSPEC_FMAXV UNSPEC_FMINV
3110 UNSPEC_FMAXNMV UNSPEC_FMINNMV])
3112 (define_int_iterator FMAXMINNMV [UNSPEC_FMAXNMV UNSPEC_FMINNMV])
3114 (define_int_iterator SVE_INT_ADDV [UNSPEC_SADDV UNSPEC_UADDV])
3116 (define_int_iterator LOGICALF [UNSPEC_ANDF UNSPEC_IORF UNSPEC_XORF])
3118 (define_int_iterator HADDSUB [UNSPEC_SHADD UNSPEC_UHADD
3119 UNSPEC_SRHADD UNSPEC_URHADD
3120 UNSPEC_SHSUB UNSPEC_UHSUB])
3122 (define_int_iterator HADD [UNSPEC_SHADD UNSPEC_UHADD])
3124 (define_int_iterator RHADD [UNSPEC_SRHADD UNSPEC_URHADD])
3126 (define_int_iterator BSL_DUP [1 2])
3128 (define_int_iterator DOTPROD [UNSPEC_SDOT UNSPEC_UDOT])
3130 (define_int_iterator DOTPROD_I8MM [UNSPEC_USDOT UNSPEC_SUDOT])
3131 (define_int_iterator DOTPROD_US_ONLY [UNSPEC_USDOT])
3133 (define_int_iterator FMAXMIN_UNS [UNSPEC_FMAX UNSPEC_FMIN
3134 UNSPEC_FMAXNM UNSPEC_FMINNM])
3136 (define_int_iterator PAUTH_LR_SP [UNSPEC_PACIASP UNSPEC_AUTIASP
3137 UNSPEC_PACIBSP UNSPEC_AUTIBSP])
3139 (define_int_iterator PAUTH_17_16 [UNSPEC_PACIA1716 UNSPEC_AUTIA1716
3140 UNSPEC_PACIB1716 UNSPEC_AUTIB1716])
3142 (define_int_iterator VQDMULH [UNSPEC_SQDMULH UNSPEC_SQRDMULH])
3144 (define_int_iterator MULHRS [UNSPEC_SMULHS UNSPEC_UMULHS
3145 UNSPEC_SMULHRS UNSPEC_UMULHRS])
3147 (define_int_iterator USSUQADD [UNSPEC_SUQADD UNSPEC_USQADD])
3149 (define_int_iterator VSHL [UNSPEC_SSHL UNSPEC_USHL
3150 UNSPEC_SRSHL UNSPEC_URSHL])
3152 (define_int_iterator VSHLL [UNSPEC_SSHLL UNSPEC_USHLL])
3154 (define_int_iterator VQSHL [UNSPEC_SQSHL UNSPEC_UQSHL
3155 UNSPEC_SQRSHL UNSPEC_UQRSHL])
3157 (define_int_iterator VSRA [UNSPEC_SSRA UNSPEC_USRA])
3159 (define_int_iterator VSLRI [UNSPEC_SSLI UNSPEC_USLI
3160 UNSPEC_SSRI UNSPEC_USRI])
3163 (define_int_iterator VRSHR_N [UNSPEC_SRSHR UNSPEC_URSHR])
3165 (define_int_iterator VQSHL_N [UNSPEC_SQSHLU UNSPEC_SQSHL UNSPEC_UQSHL])
3167 (define_int_iterator SQRDMLH_AS [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH])
3169 (define_int_iterator PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2
3170 UNSPEC_TRN1 UNSPEC_TRN2
3171 UNSPEC_UZP1 UNSPEC_UZP2])
3173 (define_int_iterator SVE_PERMUTE
3175 (UNSPEC_UZPQ1 "TARGET_SVE2p1 && TARGET_NON_STREAMING")
3176 (UNSPEC_UZPQ2 "TARGET_SVE2p1 && TARGET_NON_STREAMING")
3177 (UNSPEC_ZIPQ1 "TARGET_SVE2p1 && TARGET_NON_STREAMING")
3178 (UNSPEC_ZIPQ2 "TARGET_SVE2p1 && TARGET_NON_STREAMING")])
3180 (define_int_iterator SVE_TBL
3182 (UNSPEC_TBLQ "TARGET_SVE2p1 && TARGET_NON_STREAMING")])
3184 (define_int_iterator SVE_TBX
3186 (UNSPEC_TBXQ "TARGET_SVE2p1 && TARGET_NON_STREAMING")])
3188 (define_int_iterator PERMUTEQ [UNSPEC_ZIP1Q UNSPEC_ZIP2Q
3189 UNSPEC_TRN1Q UNSPEC_TRN2Q
3190 UNSPEC_UZP1Q UNSPEC_UZP2Q])
3192 (define_int_iterator OPTAB_PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2
3193 UNSPEC_UZP1 UNSPEC_UZP2])
3195 (define_int_iterator REVERSE [UNSPEC_REV64 UNSPEC_REV32 UNSPEC_REV16])
3197 (define_int_iterator FRINT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
3198 UNSPEC_FRINTN UNSPEC_FRINTI UNSPEC_FRINTX
3201 (define_int_iterator FCVT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
3202 UNSPEC_FRINTA UNSPEC_FRINTN])
3204 (define_int_iterator FCVT_F2FIXED [UNSPEC_FCVTZS UNSPEC_FCVTZU])
3205 (define_int_iterator FCVT_FIXED2F [UNSPEC_SCVTF UNSPEC_UCVTF])
3207 (define_int_iterator CRC [UNSPEC_CRC32B UNSPEC_CRC32H UNSPEC_CRC32W
3208 UNSPEC_CRC32X UNSPEC_CRC32CB UNSPEC_CRC32CH
3209 UNSPEC_CRC32CW UNSPEC_CRC32CX])
3211 (define_int_iterator CRYPTO_AES [UNSPEC_AESE UNSPEC_AESD])
3212 (define_int_iterator CRYPTO_AESMC [UNSPEC_AESMC UNSPEC_AESIMC])
3214 (define_int_iterator CRYPTO_SHA1 [UNSPEC_SHA1C UNSPEC_SHA1M UNSPEC_SHA1P])
3216 (define_int_iterator CRYPTO_SHA256 [UNSPEC_SHA256H UNSPEC_SHA256H2])
3218 (define_int_iterator CRYPTO_SHA512 [UNSPEC_SHA512H UNSPEC_SHA512H2])
3220 (define_int_iterator CRYPTO_SM3TT [UNSPEC_SM3TT1A UNSPEC_SM3TT1B
3221 UNSPEC_SM3TT2A UNSPEC_SM3TT2B])
3223 (define_int_iterator CRYPTO_SM3PART [UNSPEC_SM3PARTW1 UNSPEC_SM3PARTW2])
3225 ;; Iterators for fp16 operations
3227 (define_int_iterator VFMLA16_LOW [UNSPEC_FMLAL UNSPEC_FMLSL])
3229 (define_int_iterator VFMLA16_HIGH [UNSPEC_FMLAL2 UNSPEC_FMLSL2])
3231 (define_int_iterator UNPACK [UNSPEC_UNPACKSHI UNSPEC_UNPACKUHI
3232 UNSPEC_UNPACKSLO UNSPEC_UNPACKULO])
3234 (define_int_iterator UNPACK_UNSIGNED [UNSPEC_UNPACKULO UNSPEC_UNPACKUHI])
3236 (define_int_iterator MUL_HIGHPART [UNSPEC_SMUL_HIGHPART UNSPEC_UMUL_HIGHPART])
3238 (define_int_iterator CLAST [UNSPEC_CLASTA UNSPEC_CLASTB])
3240 (define_int_iterator LAST [UNSPEC_LASTA UNSPEC_LASTB])
3242 ;; Iterators for fp8 operations
3244 (define_int_iterator FAMINMAX_UNS [UNSPEC_FAMAX UNSPEC_FAMIN])
3246 (define_int_iterator SVE_INT_UNARY [UNSPEC_REVB
3247 UNSPEC_REVH UNSPEC_REVW])
3249 (define_int_iterator SVE_FP_UNARY [UNSPEC_FRECPE UNSPEC_RSQRTE])
3251 (define_int_iterator SVE_FP_UNARY_INT [(UNSPEC_FEXPA "TARGET_NON_STREAMING")])
3253 (define_int_iterator SVE_INT_SHIFT_IMM [UNSPEC_ASRD
3254 (UNSPEC_SQSHLU "TARGET_SVE2")
3255 (UNSPEC_SRSHR "TARGET_SVE2")
3256 (UNSPEC_URSHR "TARGET_SVE2")])
3258 (define_int_iterator SVE_INT_BINARY_MULTI [UNSPEC_SQDMULH
3259 UNSPEC_SRSHL UNSPEC_URSHL])
3261 (define_int_iterator SVE_FP_BINARY [UNSPEC_FRECPS UNSPEC_RSQRTS])
3263 (define_int_iterator SVE_FP_BINARY_INT [UNSPEC_FTSMUL UNSPEC_FTSSEL])
3265 (define_int_iterator SVE_FP_BINARY_MULTI [UNSPEC_FMAX UNSPEC_FMAXNM
3266 UNSPEC_FMIN UNSPEC_FMINNM])
3268 (define_int_iterator SVE_BFLOAT_TERNARY_LONG
3269 [(UNSPEC_BFDOT "TARGET_SVE_BF16")
3270 (UNSPEC_BFMLALB "TARGET_SVE_BF16")
3271 (UNSPEC_BFMLALT "TARGET_SVE_BF16")
3272 (UNSPEC_BFMLSLB "TARGET_SVE2p1_OR_SME2")
3273 (UNSPEC_BFMLSLT "TARGET_SVE2p1_OR_SME2")
3274 (UNSPEC_BFMMLA "TARGET_SVE_BF16 && TARGET_NON_STREAMING")])
3276 (define_int_iterator SVE_BFLOAT_TERNARY_LONG_LANE
3277 [(UNSPEC_BFDOT "TARGET_SVE_BF16")
3278 (UNSPEC_BFMLALB "TARGET_SVE_BF16")
3279 (UNSPEC_BFMLALT "TARGET_SVE_BF16")
3280 (UNSPEC_BFMLSLB "TARGET_SVE2p1_OR_SME2")
3281 (UNSPEC_BFMLSLT "TARGET_SVE2p1_OR_SME2")])
3283 (define_int_iterator SVE_INT_REDUCTION [UNSPEC_ANDV
3291 (define_int_iterator SVE_INT_REDUCTION_128 [UNSPEC_ADDQV
3300 (define_int_iterator SVE_FP_REDUCTION [UNSPEC_FADDV
3306 (define_int_iterator SVE_FP_REDUCTION_128 [UNSPEC_FADDQV
3312 (define_int_iterator SVE_COND_FP_UNARY [UNSPEC_COND_FABS
3324 ;; Same as SVE_COND_FP_UNARY, but without codes that have a dedicated
3325 ;; <optab><mode>2 expander.
3326 (define_int_iterator SVE_COND_FP_UNARY_OPTAB [UNSPEC_COND_FABS
3335 UNSPEC_COND_FRINTZ])
3337 (define_int_iterator SVE_COND_FCVT [UNSPEC_COND_FCVT])
3338 (define_int_iterator SVE_COND_FCVTI [UNSPEC_COND_FCVTZS UNSPEC_COND_FCVTZU])
3339 (define_int_iterator SVE_COND_ICVTF [UNSPEC_COND_SCVTF UNSPEC_COND_UCVTF])
3341 (define_int_iterator SVE_COND_FP_BINARY
3343 (UNSPEC_COND_FAMAX "TARGET_FAMINMAX && TARGET_SVE2_OR_SME2")
3344 (UNSPEC_COND_FAMIN "TARGET_FAMINMAX && TARGET_SVE2_OR_SME2")
3356 ;; Same as SVE_COND_FP_BINARY, but without codes that have a dedicated
3357 ;; <optab><mode>3 expander.
3358 (define_int_iterator SVE_COND_FP_BINARY_OPTAB [UNSPEC_COND_FADD
3369 (define_int_iterator SVE_COND_FP_BINARY_INT [UNSPEC_COND_FSCALE])
3371 (define_int_iterator SVE_COND_FP_ADD [UNSPEC_COND_FADD])
3372 (define_int_iterator SVE_COND_FP_SUB [UNSPEC_COND_FSUB])
3373 (define_int_iterator SVE_COND_FP_MUL [UNSPEC_COND_FMUL])
3375 (define_int_iterator SVE_COND_FP_BINARY_I1 [UNSPEC_COND_FMAX
3383 (define_int_iterator SVE_COND_FP_BINARY_REG
3384 [(UNSPEC_COND_FAMAX "TARGET_FAMINMAX && TARGET_SVE2_OR_SME2")
3385 (UNSPEC_COND_FAMIN "TARGET_FAMINMAX && TARGET_SVE2_OR_SME2")
3389 (define_int_iterator SVE_COND_FCADD [UNSPEC_COND_FCADD90
3390 UNSPEC_COND_FCADD270])
3392 (define_int_iterator SVE_COND_FP_MAXMIN [UNSPEC_COND_FMAX
3399 (define_int_iterator SVE_COND_SMAXMIN [UNSPEC_COND_SMAX
3402 (define_int_iterator SVE_COND_FP_TERNARY [UNSPEC_COND_FMLA
3407 (define_int_iterator SVE_COND_FCMLA [UNSPEC_COND_FCMLA
3409 UNSPEC_COND_FCMLA180
3410 UNSPEC_COND_FCMLA270])
3412 (define_int_iterator SVE_COND_INT_CMP_WIDE [UNSPEC_COND_CMPEQ_WIDE
3413 UNSPEC_COND_CMPGE_WIDE
3414 UNSPEC_COND_CMPGT_WIDE
3415 UNSPEC_COND_CMPHI_WIDE
3416 UNSPEC_COND_CMPHS_WIDE
3417 UNSPEC_COND_CMPLE_WIDE
3418 UNSPEC_COND_CMPLO_WIDE
3419 UNSPEC_COND_CMPLS_WIDE
3420 UNSPEC_COND_CMPLT_WIDE
3421 UNSPEC_COND_CMPNE_WIDE])
3423 ;; SVE FP comparisons that accept #0.0.
3424 (define_int_iterator SVE_COND_FP_CMP_I0 [UNSPEC_COND_FCMEQ
3431 (define_int_iterator SVE_COND_FP_ABS_CMP [UNSPEC_COND_FCMGE
3436 (define_int_iterator SVE_FP_TERNARY_LANE [UNSPEC_FMLA UNSPEC_FMLS])
3438 (define_int_iterator SVE_CFP_TERNARY_LANE [UNSPEC_FCMLA UNSPEC_FCMLA90
3439 UNSPEC_FCMLA180 UNSPEC_FCMLA270])
3441 (define_int_iterator SVE_WHILE [UNSPEC_WHILELE UNSPEC_WHILELO
3442 UNSPEC_WHILELS UNSPEC_WHILELT
3443 (UNSPEC_WHILEGE "TARGET_SVE2")
3444 (UNSPEC_WHILEGT "TARGET_SVE2")
3445 (UNSPEC_WHILEHI "TARGET_SVE2")
3446 (UNSPEC_WHILEHS "TARGET_SVE2")
3447 (UNSPEC_WHILERW "TARGET_SVE2")
3448 (UNSPEC_WHILEWR "TARGET_SVE2")])
3450 (define_int_iterator SVE2_WHILE_PTR [UNSPEC_WHILERW UNSPEC_WHILEWR])
3452 (define_int_iterator SVE_WHILE_ORDER [UNSPEC_WHILEGE UNSPEC_WHILEGT
3453 UNSPEC_WHILEHI UNSPEC_WHILEHS
3454 UNSPEC_WHILELE UNSPEC_WHILELO
3455 UNSPEC_WHILELS UNSPEC_WHILELT])
3457 (define_int_iterator SVE_SHIFT_WIDE [UNSPEC_ASHIFT_WIDE
3458 UNSPEC_ASHIFTRT_WIDE
3459 UNSPEC_LSHIFTRT_WIDE])
3461 (define_int_iterator SVE_LDFF1_LDNF1 [UNSPEC_LDFF1 UNSPEC_LDNF1])
3463 (define_int_iterator LD1_COUNT [UNSPEC_LD1_COUNT UNSPEC_LDNT1_COUNT])
3465 (define_int_iterator ST1_COUNT [UNSPEC_ST1_COUNT UNSPEC_STNT1_COUNT])
3467 (define_int_iterator SVE2_U32_UNARY [UNSPEC_URECPE UNSPEC_RSQRTE])
3469 (define_int_iterator SVE2_INT_UNARY_NARROWB [UNSPEC_SQXTNB
3473 (define_int_iterator SVE2_INT_UNARY_NARROWT [UNSPEC_SQXTNT
3477 (define_int_iterator SVE2_INT_BINARY [UNSPEC_SQDMULH
3480 (define_int_iterator SVE2_INT_BINARY_LANE [UNSPEC_SQDMULH
3483 (define_int_iterator SVE2_INT_BINARY_LONG [UNSPEC_SABDLB
3505 (define_int_iterator SVE2_INT_BINARY_LONG_LANE [UNSPEC_SMULLB
3512 (define_int_iterator SVE2_INT_BINARY_NARROWB [UNSPEC_ADDHNB
3517 (define_int_iterator SVE2_INT_BINARY_NARROWT [UNSPEC_ADDHNT
3522 (define_int_iterator SVE2_INT_BINARY_PAIR [UNSPEC_ADDP
3528 (define_int_iterator SVE2_FP_BINARY_PAIR [UNSPEC_FADDP
3534 (define_int_iterator SVE2_INT_BINARY_PAIR_LONG [UNSPEC_SADALP UNSPEC_UADALP])
3536 (define_int_iterator SVE2_INT_BINARY_WIDE [UNSPEC_SADDWB
3545 (define_int_iterator SVE2_INT_SHIFT_IMM_LONG [UNSPEC_SSHLLB
3550 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWB [UNSPEC_RSHRNB
3559 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWT [UNSPEC_RSHRNT
3568 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWxN
3569 [(UNSPEC_SQRSHR "TARGET_STREAMING_SME2")
3570 (UNSPEC_SQRSHRN "TARGET_SVE2p1_OR_SME2")
3571 (UNSPEC_SQRSHRU "TARGET_STREAMING_SME2")
3572 (UNSPEC_SQRSHRUN "TARGET_SVE2p1_OR_SME2")
3573 (UNSPEC_UQRSHR "TARGET_STREAMING_SME2")
3574 (UNSPEC_UQRSHRN "TARGET_SVE2p1_OR_SME2")])
3576 (define_int_iterator SVE2_INT_SHIFT_INSERT [UNSPEC_SLI UNSPEC_SRI])
3578 (define_int_iterator SVE2_INT_CADD [UNSPEC_CADD90
3583 (define_int_iterator SVE2_INT_BITPERM [UNSPEC_BDEP UNSPEC_BEXT UNSPEC_BGRP])
3585 (define_int_iterator SVE2_INT_TERNARY [UNSPEC_ADCLB
3594 (define_int_iterator SVE2_INT_TERNARY_LANE [UNSPEC_SQRDMLAH
3597 (define_int_iterator SVE2_FP_TERNARY_LONG [UNSPEC_FMLALB
3602 (define_int_iterator SVE2_FP_TERNARY_LONG_LANE [UNSPEC_FMLALB
3607 (define_int_iterator SVE2_INT_CMLA [UNSPEC_CMLA
3614 UNSPEC_SQRDCMLAH270])
3616 ;; Unlike the normal CMLA instructions these represent the actual operation
3617 ;; to be performed. They will always need to be expanded into multiple
3618 ;; sequences consisting of CMLA.
3619 (define_int_iterator SVE2_INT_CMLA_OP [UNSPEC_CMLA
3622 UNSPEC_CMLA180_CONJ])
3624 ;; Unlike the normal CMLA instructions these represent the actual operation
3625 ;; to be performed. They will always need to be expanded into multiple
3626 ;; sequences consisting of CMLA.
3627 (define_int_iterator SVE2_INT_CMUL_OP [UNSPEC_CMUL
3630 ;; Same as SVE2_INT_CADD but exclude the saturating instructions
3631 (define_int_iterator SVE2_INT_CADD_OP [UNSPEC_CADD90
3634 (define_int_iterator SVE2_INT_CDOT [UNSPEC_CDOT
3639 (define_int_iterator SVE2_INT_ADD_BINARY_LONG [UNSPEC_SABDLB
3648 (define_int_iterator SVE2_INT_QADD_BINARY_LONG [UNSPEC_SQDMULLB
3652 (define_int_iterator SVE2_INT_SUB_BINARY_LONG [UNSPEC_SMULLB
3657 (define_int_iterator SVE2_INT_QSUB_BINARY_LONG [UNSPEC_SQDMULLB
3661 (define_int_iterator SVE2_INT_ADD_BINARY_LONG_LANE [UNSPEC_SMULLB
3666 (define_int_iterator SVE2_INT_QADD_BINARY_LONG_LANE [UNSPEC_SQDMULLB
3669 (define_int_iterator SVE2_INT_SUB_BINARY_LONG_LANE [UNSPEC_SMULLB
3674 (define_int_iterator SVE2_INT_QSUB_BINARY_LONG_LANE [UNSPEC_SQDMULLB
3677 (define_int_iterator SVE2_COND_INT_UNARY_FP [UNSPEC_COND_FLOGB])
3679 (define_int_iterator SVE2_COND_FP_UNARY_LONG [UNSPEC_COND_FCVTLT])
3681 (define_int_iterator SVE2_COND_FP_UNARY_NARROWB [UNSPEC_COND_FCVTX])
3683 (define_int_iterator SVE2_COND_INT_BINARY [UNSPEC_SHADD
3696 (define_int_iterator SVE2_COND_INT_BINARY_NOREV [UNSPEC_SUQADD
3699 (define_int_iterator SVE2_COND_INT_BINARY_REV [UNSPEC_SHADD
3710 (define_int_iterator SVE2_COND_INT_SHIFT [UNSPEC_SQSHL
3713 (define_int_iterator SVE2_MATCH [UNSPEC_MATCH UNSPEC_NMATCH])
3715 (define_int_iterator SVE2_PMULL [UNSPEC_PMULLB UNSPEC_PMULLT])
3717 (define_int_iterator SVE2_PMULL_PAIR [UNSPEC_PMULLB_PAIR UNSPEC_PMULLT_PAIR])
3719 (define_int_iterator SVE_QCVTxN [(UNSPEC_SQCVT "TARGET_STREAMING_SME2")
3720 (UNSPEC_SQCVTN "TARGET_SVE2p1_OR_SME2")
3721 (UNSPEC_SQCVTU "TARGET_STREAMING_SME2")
3722 (UNSPEC_SQCVTUN "TARGET_SVE2p1_OR_SME2")
3723 (UNSPEC_UQCVT "TARGET_STREAMING_SME2")
3724 (UNSPEC_UQCVTN "TARGET_SVE2p1_OR_SME2")])
3726 (define_int_iterator SVE2_SFx24_UNARY [UNSPEC_FRINTA UNSPEC_FRINTM
3727 UNSPEC_FRINTN UNSPEC_FRINTP])
3729 (define_int_iterator SVE2_x24_PERMUTE [UNSPEC_ZIP UNSPEC_UZP])
3730 (define_int_iterator SVE2_x24_PERMUTEQ [UNSPEC_ZIPQ UNSPEC_UZPQ])
3732 (define_int_iterator FCADD [UNSPEC_FCADD90
3735 (define_int_iterator FCMLA [UNSPEC_FCMLA
3740 (define_int_iterator FRINTNZX [UNSPEC_FRINT32Z UNSPEC_FRINT32X
3741 UNSPEC_FRINT64Z UNSPEC_FRINT64X])
3743 (define_int_iterator SVE_BRK_UNARY [UNSPEC_BRKA UNSPEC_BRKB])
3745 (define_int_iterator SVE_BRKP [UNSPEC_BRKPA UNSPEC_BRKPB])
3747 (define_int_iterator SVE_BRK_BINARY [UNSPEC_BRKN UNSPEC_BRKPA UNSPEC_BRKPB])
3749 (define_int_iterator SVE_PITER [UNSPEC_PFIRST UNSPEC_PNEXT])
3751 (define_int_iterator MATMUL [UNSPEC_SMATMUL UNSPEC_UMATMUL
3754 (define_int_iterator FMMLA [UNSPEC_FMMLA])
3756 (define_int_iterator BF_MLA [UNSPEC_BFMLALB
3759 (define_int_iterator FCMLA_OP [UNSPEC_FCMLA
3762 UNSPEC_FCMLA180_CONJ])
3764 (define_int_iterator FCMUL_OP [UNSPEC_FCMUL
3767 (define_int_iterator UNSPEC_REVD_ONLY [UNSPEC_REVD])
3769 (define_int_iterator SME_LD1 [UNSPEC_SME_LD1_HOR UNSPEC_SME_LD1_VER])
3770 (define_int_iterator SME_READ_HV [UNSPEC_SME_READ_HOR UNSPEC_SME_READ_VER])
3771 (define_int_iterator SME_READZ_HV [UNSPEC_SME_READZ_HOR UNSPEC_SME_READZ_VER])
3772 (define_int_iterator SME_ST1 [UNSPEC_SME_ST1_HOR UNSPEC_SME_ST1_VER])
3773 (define_int_iterator SME_WRITE_HV [UNSPEC_SME_WRITE_HOR UNSPEC_SME_WRITE_VER])
3775 (define_int_iterator SME_BINARY_SDI [UNSPEC_SME_ADDHA UNSPEC_SME_ADDVA])
3777 (define_int_iterator SME_INT_MOP [UNSPEC_SME_SMOPA UNSPEC_SME_SMOPS
3778 UNSPEC_SME_SUMOPA UNSPEC_SME_SUMOPS
3779 UNSPEC_SME_UMOPA UNSPEC_SME_UMOPS
3780 UNSPEC_SME_USMOPA UNSPEC_SME_USMOPS])
3782 (define_int_iterator SME2_INT_MOP [UNSPEC_SME_SMOPA UNSPEC_SME_SMOPS
3783 UNSPEC_SME_UMOPA UNSPEC_SME_UMOPS])
3785 (define_int_iterator SME_FP_MOP [UNSPEC_SME_FMOPA UNSPEC_SME_FMOPS])
3787 (define_int_iterator SME2_BMOP [UNSPEC_SME_BMOPA UNSPEC_SME_BMOPS])
3789 (define_int_iterator SME_BINARY_SLICE_SDI [UNSPEC_SME_ADD UNSPEC_SME_SUB])
3791 (define_int_iterator SME_BINARY_SLICE_HSDF [UNSPEC_SME_FADD UNSPEC_SME_FSUB])
3793 (define_int_iterator SME_BINARY_WRITE_SLICE_SDI [UNSPEC_SME_ADD_WRITE
3794 UNSPEC_SME_SUB_WRITE])
3796 (define_int_iterator SME_INT_DOTPROD [UNSPEC_SME_SDOT UNSPEC_SME_UDOT
3799 (define_int_iterator SME_INT_DOTPROD_LANE [UNSPEC_SME_SDOT UNSPEC_SME_SVDOT
3800 UNSPEC_SME_UDOT UNSPEC_SME_UVDOT
3801 UNSPEC_SME_SUDOT UNSPEC_SME_SUVDOT
3802 UNSPEC_SME_USDOT UNSPEC_SME_USVDOT])
3804 (define_int_iterator SME_FP_DOTPROD [UNSPEC_SME_FDOT])
3806 (define_int_iterator SME_FP_DOTPROD_LANE [UNSPEC_SME_FDOT UNSPEC_SME_FVDOT])
3808 (define_int_iterator SME_INT_TERNARY_SLICE [UNSPEC_SME_SMLA UNSPEC_SME_SMLS
3809 UNSPEC_SME_UMLA UNSPEC_SME_UMLS])
3811 (define_int_iterator SME_FP_TERNARY_SLICE [UNSPEC_SME_FMLA UNSPEC_SME_FMLS])
3813 ;; Iterators for atomic operations.
3815 (define_int_iterator ATOMIC_LDOP
3816 [UNSPECV_ATOMIC_LDOP_OR UNSPECV_ATOMIC_LDOP_BIC
3817 UNSPECV_ATOMIC_LDOP_XOR UNSPECV_ATOMIC_LDOP_PLUS])
3819 (define_int_iterator SUBDI_BITS [8 16 32])
3821 (define_int_iterator BHSD_BITS [8 16 32 64])
3823 (define_int_iterator LUTI_BITS [2 4])
3825 (define_int_iterator GET_FPSCR
3826 [UNSPECV_GET_FPSR UNSPECV_GET_FPCR])
3828 (define_int_iterator SET_FPSCR
3829 [UNSPECV_SET_FPSR UNSPECV_SET_FPCR])
3831 (define_int_iterator FP8CVT_UNS
3837 (define_int_iterator FMLAL_FP8_HF
3841 (define_int_iterator FMLALL_FP8_SF
3842 [UNSPEC_FMLALLBB_FP8
3845 UNSPEC_FMLALLTT_FP8])
3847 ;; Iterators for fpm instructions
3849 (define_int_iterator FPM_UNARY_UNS [UNSPEC_F1CVTL_FP8 UNSPEC_F2CVTL_FP8])
3851 (define_int_iterator FPM_BINARY_UNS [UNSPEC_FCVTN_FP8])
3853 (define_int_iterator FSCALE_UNS [UNSPEC_FSCALE])
3855 (define_int_iterator FPM_FDOT [UNSPEC_FDOT_FP8])
3856 (define_int_iterator FPM_FDOT_LANE [UNSPEC_FDOT_LANE_FP8])
3858 ;; -------------------------------------------------------------------
3859 ;; Int Iterators Attributes.
3860 ;; -------------------------------------------------------------------
3862 ;; The AArch64 insn mnemonic associated with an unspec.
3863 (define_int_attr insn
3864 [(UNSPEC_F1CVTL_FP8 "f1cvtl")
3865 (UNSPEC_F2CVTL_FP8 "f2cvtl")
3866 (UNSPEC_FCVTN_FP8 "fcvtn")
3867 (UNSPEC_FDOT_FP8 "fdot")
3868 (UNSPEC_FDOT_LANE_FP8 "fdot")
3869 (UNSPEC_FMLALB_FP8 "fmlalb")
3870 (UNSPEC_FMLALT_FP8 "fmlalt")
3871 (UNSPEC_FMLALLBB_FP8 "fmlallbb")
3872 (UNSPEC_FMLALLBT_FP8 "fmlallbt")
3873 (UNSPEC_FMLALLTB_FP8 "fmlalltb")
3874 (UNSPEC_FMLALLTT_FP8 "fmlalltt")
3875 (UNSPEC_FSCALE "fscale")])
3877 ;; The optab associated with an operation. Note that for ANDF, IORF
3878 ;; and XORF, the optab pattern is not actually defined; we just use this
3879 ;; name for consistency with the integer patterns.
3880 (define_int_attr optab [(UNSPEC_ANDF "and")
3883 (UNSPEC_SADDV "sadd")
3884 (UNSPEC_UADDV "uadd")
3888 (UNSPEC_FRECPE "frecpe")
3889 (UNSPEC_FRECPS "frecps")
3890 (UNSPEC_RSQRTE "frsqrte")
3891 (UNSPEC_RSQRTS "frsqrts")
3892 (UNSPEC_REVB "revb")
3893 (UNSPEC_REVD "revd")
3894 (UNSPEC_REVH "revh")
3895 (UNSPEC_REVW "revw")
3896 (UNSPEC_UMAXV "umax")
3897 (UNSPEC_UMINV "umin")
3898 (UNSPEC_SMAXV "smax")
3899 (UNSPEC_SMINV "smin")
3900 (UNSPEC_ADDQV "addqv")
3901 (UNSPEC_ANDQV "andqv")
3902 (UNSPEC_CADD90 "cadd90")
3903 (UNSPEC_CADD270 "cadd270")
3904 (UNSPEC_CDOT "cdot")
3905 (UNSPEC_CDOT90 "cdot90")
3906 (UNSPEC_CDOT180 "cdot180")
3907 (UNSPEC_CDOT270 "cdot270")
3908 (UNSPEC_CMLA "cmla")
3909 (UNSPEC_CMLA90 "cmla90")
3910 (UNSPEC_CMLA180 "cmla180")
3911 (UNSPEC_CMLA270 "cmla270")
3912 (UNSPEC_EORQV "eorqv")
3913 (UNSPEC_FADDV "plus")
3914 (UNSPEC_FADDQV "faddqv")
3915 (UNSPEC_FMAXQV "fmaxqv")
3916 (UNSPEC_FMAXNMQV "fmaxnmqv")
3917 (UNSPEC_FMAXNMV "smax")
3918 (UNSPEC_FMAXV "smax_nan")
3919 (UNSPEC_FMINQV "fminqv")
3920 (UNSPEC_FMINNMQV "fminnmqv")
3921 (UNSPEC_FMINNMV "smin")
3922 (UNSPEC_FMINV "smin_nan")
3923 (UNSPEC_SMUL_HIGHPART "smulh")
3924 (UNSPEC_UMUL_HIGHPART "umulh")
3926 (UNSPEC_FMLS "fnma")
3927 (UNSPEC_FCMLA "fcmla")
3928 (UNSPEC_FCMLA90 "fcmla90")
3929 (UNSPEC_FCMLA180 "fcmla180")
3930 (UNSPEC_FCMLA270 "fcmla270")
3931 (UNSPEC_FEXPA "fexpa")
3932 (UNSPEC_FTSMUL "ftsmul")
3933 (UNSPEC_FTSSEL "ftssel")
3934 (UNSPEC_LD1_COUNT "ld1")
3935 (UNSPEC_LDNT1_COUNT "ldnt1")
3936 (UNSPEC_ORQV "orqv")
3937 (UNSPEC_PMULLB "pmullb")
3938 (UNSPEC_PMULLB_PAIR "pmullb_pair")
3939 (UNSPEC_PMULLT "pmullt")
3940 (UNSPEC_PMULLT_PAIR "pmullt_pair")
3941 (UNSPEC_SMATMUL "smatmul")
3942 (UNSPEC_SMAXQV "smaxqv")
3943 (UNSPEC_SMINQV "sminqv")
3944 (UNSPEC_UMAXQV "umaxqv")
3945 (UNSPEC_UMINQV "uminqv")
3947 (UNSPEC_UZPQ "uzpq")
3949 (UNSPEC_ZIPQ "zipq")
3950 (UNSPEC_SME_ADD "add")
3951 (UNSPEC_SME_ADD_WRITE "add_write")
3952 (UNSPEC_SME_ADDHA "addha")
3953 (UNSPEC_SME_ADDVA "addva")
3954 (UNSPEC_SME_BMOPA "bmopa")
3955 (UNSPEC_SME_BMOPS "bmops")
3956 (UNSPEC_SME_FADD "fadd")
3957 (UNSPEC_SME_FDOT "fdot")
3958 (UNSPEC_SME_FVDOT "fvdot")
3959 (UNSPEC_SME_FMLA "fmla")
3960 (UNSPEC_SME_FMLS "fmls")
3961 (UNSPEC_SME_FMOPA "fmopa")
3962 (UNSPEC_SME_FMOPS "fmops")
3963 (UNSPEC_SME_FSUB "fsub")
3964 (UNSPEC_SME_LD1_HOR "ld1_hor")
3965 (UNSPEC_SME_LD1_VER "ld1_ver")
3966 (UNSPEC_SME_READ_HOR "read_hor")
3967 (UNSPEC_SME_READ_VER "read_ver")
3968 (UNSPEC_SME_READZ_HOR "readz_hor")
3969 (UNSPEC_SME_READZ_VER "readz_ver")
3970 (UNSPEC_SME_SDOT "sdot")
3971 (UNSPEC_SME_SVDOT "svdot")
3972 (UNSPEC_SME_SMLA "smla")
3973 (UNSPEC_SME_SMLS "smls")
3974 (UNSPEC_SME_SMOPA "smopa")
3975 (UNSPEC_SME_SMOPS "smops")
3976 (UNSPEC_SME_ST1_HOR "st1_hor")
3977 (UNSPEC_SME_ST1_VER "st1_ver")
3978 (UNSPEC_SME_SUB "sub")
3979 (UNSPEC_SME_SUB_WRITE "sub_write")
3980 (UNSPEC_SME_SUDOT "sudot")
3981 (UNSPEC_SME_SUVDOT "suvdot")
3982 (UNSPEC_SME_SUMOPA "sumopa")
3983 (UNSPEC_SME_SUMOPS "sumops")
3984 (UNSPEC_SME_UDOT "udot")
3985 (UNSPEC_SME_UVDOT "uvdot")
3986 (UNSPEC_SME_UMLA "umla")
3987 (UNSPEC_SME_UMLS "umls")
3988 (UNSPEC_SME_UMOPA "umopa")
3989 (UNSPEC_SME_UMOPS "umops")
3990 (UNSPEC_SME_USDOT "usdot")
3991 (UNSPEC_SME_USVDOT "usvdot")
3992 (UNSPEC_SME_USMOPA "usmopa")
3993 (UNSPEC_SME_USMOPS "usmops")
3994 (UNSPEC_SME_WRITE_HOR "write_hor")
3995 (UNSPEC_SME_WRITE_VER "write_ver")
3996 (UNSPEC_SQCADD90 "sqcadd90")
3997 (UNSPEC_SQCADD270 "sqcadd270")
3998 (UNSPEC_SQCVT "sqcvt")
3999 (UNSPEC_SQCVTN "sqcvtn")
4000 (UNSPEC_SQCVTU "sqcvtu")
4001 (UNSPEC_SQCVTUN "sqcvtun")
4002 (UNSPEC_SQRDCMLAH "sqrdcmlah")
4003 (UNSPEC_SQRDCMLAH90 "sqrdcmlah90")
4004 (UNSPEC_SQRDCMLAH180 "sqrdcmlah180")
4005 (UNSPEC_SQRDCMLAH270 "sqrdcmlah270")
4006 (UNSPEC_ST1_COUNT "st1")
4007 (UNSPEC_STNT1_COUNT "stnt1")
4008 (UNSPEC_TRN1Q "trn1q")
4009 (UNSPEC_TRN2Q "trn2q")
4010 (UNSPEC_UMATMUL "umatmul")
4011 (UNSPEC_UQCVT "uqcvt")
4012 (UNSPEC_UQCVTN "uqcvtn")
4013 (UNSPEC_USMATMUL "usmatmul")
4014 (UNSPEC_UZP1Q "uzp1q")
4015 (UNSPEC_UZP2Q "uzp2q")
4016 (UNSPEC_WHILERW "vec_check_raw_alias")
4017 (UNSPEC_WHILEWR "vec_check_war_alias")
4018 (UNSPEC_ZIP1Q "zip1q")
4019 (UNSPEC_ZIP2Q "zip2q")
4020 (UNSPEC_COND_FABS "abs")
4021 (UNSPEC_COND_FADD "add")
4022 (UNSPEC_COND_FAMAX "famax")
4023 (UNSPEC_COND_FAMIN "famin")
4024 (UNSPEC_COND_FCADD90 "cadd90")
4025 (UNSPEC_COND_FCADD270 "cadd270")
4026 (UNSPEC_COND_FCMLA "fcmla")
4027 (UNSPEC_COND_FCMLA90 "fcmla90")
4028 (UNSPEC_COND_FCMLA180 "fcmla180")
4029 (UNSPEC_COND_FCMLA270 "fcmla270")
4030 (UNSPEC_COND_FCVT "fcvt")
4031 (UNSPEC_COND_FCVTZS "fix_trunc")
4032 (UNSPEC_COND_FCVTZU "fixuns_trunc")
4033 (UNSPEC_COND_FDIV "div")
4034 (UNSPEC_COND_FMAX "fmax_nan")
4035 (UNSPEC_COND_FMAXNM "fmax")
4036 (UNSPEC_COND_FMIN "fmin_nan")
4037 (UNSPEC_COND_FMINNM "fmin")
4038 (UNSPEC_COND_FMLA "fma")
4039 (UNSPEC_COND_FMLS "fnma")
4040 (UNSPEC_COND_FMUL "mul")
4041 (UNSPEC_COND_FMULX "mulx")
4042 (UNSPEC_COND_FNEG "neg")
4043 (UNSPEC_COND_FNMLA "fnms")
4044 (UNSPEC_COND_FNMLS "fms")
4045 (UNSPEC_COND_FRECPX "frecpx")
4046 (UNSPEC_COND_FRINTA "round")
4047 (UNSPEC_COND_FRINTI "nearbyint")
4048 (UNSPEC_COND_FRINTM "floor")
4049 (UNSPEC_COND_FRINTN "frintn")
4050 (UNSPEC_COND_FRINTP "ceil")
4051 (UNSPEC_COND_FRINTX "rint")
4052 (UNSPEC_COND_FRINTZ "btrunc")
4053 (UNSPEC_COND_FSCALE "fscale")
4054 (UNSPEC_COND_FSQRT "sqrt")
4055 (UNSPEC_COND_FSUB "sub")
4056 (UNSPEC_COND_SCVTF "float")
4057 (UNSPEC_COND_SMAX "smax")
4058 (UNSPEC_COND_SMIN "smin")
4059 (UNSPEC_COND_UCVTF "floatuns")])
4061 (define_int_attr fmaxmin [(UNSPEC_FMAX "fmax_nan")
4062 (UNSPEC_FMAXNM "fmax")
4063 (UNSPEC_FMAXNMV "fmax")
4064 (UNSPEC_FMIN "fmin_nan")
4065 (UNSPEC_FMINNM "fmin")
4066 (UNSPEC_FMINNMV "fmin")])
4068 (define_int_attr maxmin_uns_op [(UNSPEC_UMAXV "umax")
4069 (UNSPEC_UMINV "umin")
4070 (UNSPEC_SMAXV "smax")
4071 (UNSPEC_SMINV "smin")
4072 (UNSPEC_FMAX "fmax")
4073 (UNSPEC_FMAXNMV "fmaxnm")
4074 (UNSPEC_FMAXV "fmax")
4075 (UNSPEC_FMIN "fmin")
4076 (UNSPEC_FMINNMV "fminnm")
4077 (UNSPEC_FMINV "fmin")
4078 (UNSPEC_FMAXNM "fmaxnm")
4079 (UNSPEC_FMINNM "fminnm")])
4081 (define_code_attr binqops_op [(ss_plus "sqadd")
4084 (us_minus "uqsub")])
4086 (define_code_attr binqops_op_rev [(ss_plus "sqsub")
4087 (ss_minus "sqadd")])
4089 (define_code_attr faminmax_op [(smax "famax") (smin "famin")])
4091 ;; The SVE logical instruction that implements an unspec.
4092 (define_int_attr logicalf_op [(UNSPEC_ANDF "and")
4094 (UNSPEC_XORF "eor")])
4096 (define_int_attr last_op [(UNSPEC_CLASTA "after_last")
4097 (UNSPEC_CLASTB "last")
4098 (UNSPEC_LASTA "after_last")
4099 (UNSPEC_LASTB "last")])
4101 ;; "s" for signed operations and "u" for unsigned ones.
4102 (define_int_attr su [(UNSPEC_SADDV "s")
4104 (UNSPEC_UNPACKSHI "s")
4105 (UNSPEC_UNPACKUHI "u")
4106 (UNSPEC_UNPACKSLO "s")
4107 (UNSPEC_UNPACKULO "u")
4108 (UNSPEC_SMUL_HIGHPART "s")
4109 (UNSPEC_UMUL_HIGHPART "u")
4110 (UNSPEC_COND_FCVTZS "s")
4111 (UNSPEC_COND_FCVTZU "u")
4112 (UNSPEC_COND_SCVTF "s")
4113 (UNSPEC_COND_UCVTF "u")
4114 (UNSPEC_SMULHS "s") (UNSPEC_UMULHS "u")
4115 (UNSPEC_SMULHRS "s") (UNSPEC_UMULHRS "u")])
4117 (define_int_attr sur [(UNSPEC_SHADD "s") (UNSPEC_UHADD "u")
4118 (UNSPEC_SRHADD "sr") (UNSPEC_URHADD "ur")
4119 (UNSPEC_SHSUB "s") (UNSPEC_UHSUB "u")
4120 (UNSPEC_SADALP "s") (UNSPEC_UADALP "u")
4121 (UNSPEC_USQADD "us") (UNSPEC_SUQADD "su")
4122 (UNSPEC_SSLI "s") (UNSPEC_USLI "u")
4123 (UNSPEC_SSRI "s") (UNSPEC_USRI "u")
4124 (UNSPEC_USRA "u") (UNSPEC_SSRA "s")
4125 (UNSPEC_URSHR "ur") (UNSPEC_SRSHR "sr")
4126 (UNSPEC_SQSHLU "s") (UNSPEC_SQSHL "s")
4128 (UNSPEC_USHL "u") (UNSPEC_SSHL "s")
4129 (UNSPEC_USHLL "u") (UNSPEC_SSHLL "s")
4130 (UNSPEC_URSHL "ur") (UNSPEC_SRSHL "sr")
4131 (UNSPEC_UQRSHL "u") (UNSPEC_SQRSHL "s")
4132 (UNSPEC_SDOT "s") (UNSPEC_UDOT "u")
4133 (UNSPEC_USDOT "us") (UNSPEC_SUDOT "su")
4134 (UNSPEC_SMATMUL "s") (UNSPEC_UMATMUL "u")
4135 (UNSPEC_USMATMUL "us")
4138 (define_int_attr r [(UNSPEC_SQDMULH "") (UNSPEC_SQRDMULH "r")
4139 (UNSPEC_SQSHL "") (UNSPEC_UQSHL "")
4140 (UNSPEC_SQRSHL "r")(UNSPEC_UQRSHL "r")
4141 (UNSPEC_SMULHS "") (UNSPEC_UMULHS "")
4142 (UNSPEC_SMULHRS "r") (UNSPEC_UMULHRS "r")
4145 (define_int_attr lr [(UNSPEC_SSLI "l") (UNSPEC_USLI "l")
4146 (UNSPEC_SSRI "r") (UNSPEC_USRI "r")
4147 (UNSPEC_SQSHL "l") (UNSPEC_UQSHL "l")
4149 (UNSPEC_SRSHR "r") (UNSPEC_URSHR "r")
4151 (UNSPEC_SLI "l") (UNSPEC_SRI "r")])
4153 (define_int_attr u [(UNSPEC_SQSHLU "u") (UNSPEC_SQSHL "") (UNSPEC_UQSHL "")
4154 (UNSPEC_SHADD "") (UNSPEC_UHADD "u")
4155 (UNSPEC_SRHADD "") (UNSPEC_URHADD "u")])
4157 (define_int_attr fn [(UNSPEC_LDFF1 "f") (UNSPEC_LDNF1 "n")])
4159 (define_int_attr ab [(UNSPEC_CLASTA "a") (UNSPEC_CLASTB "b")
4160 (UNSPEC_LASTA "a") (UNSPEC_LASTB "b")])
4162 (define_int_attr bt [(UNSPEC_BFMLALB "b") (UNSPEC_BFMLALT "t")])
4164 (define_int_attr addsub [(UNSPEC_SHADD "add")
4165 (UNSPEC_UHADD "add")
4166 (UNSPEC_SRHADD "add")
4167 (UNSPEC_URHADD "add")
4168 (UNSPEC_SHSUB "sub")
4169 (UNSPEC_UHSUB "sub")])
4171 ;; BSL variants: first commutative operand.
4172 (define_int_attr bsl_1st [(1 "w") (2 "0")])
4174 ;; BSL variants: second commutative operand.
4175 (define_int_attr bsl_2nd [(1 "0") (2 "w")])
4177 ;; BSL variants: duplicated input operand.
4178 (define_int_attr bsl_dup [(1 "1") (2 "2")])
4180 ;; BSL variants: operand which requires preserving via movprfx.
4181 (define_int_attr bsl_mov [(1 "2") (2 "1")])
4183 (define_int_attr offsetlr [(UNSPEC_SSLI "") (UNSPEC_USLI "")
4184 (UNSPEC_SSRI "offset_")
4185 (UNSPEC_USRI "offset_")])
4187 ;; Standard pattern names for floating-point rounding instructions.
4188 (define_int_attr frint_pattern [(UNSPEC_FRINTZ "btrunc")
4189 (UNSPEC_FRINTP "ceil")
4190 (UNSPEC_FRINTM "floor")
4191 (UNSPEC_FRINTI "nearbyint")
4192 (UNSPEC_FRINTX "rint")
4193 (UNSPEC_FRINTA "round")
4194 (UNSPEC_FRINTN "roundeven")])
4196 ;; frint suffix for floating-point rounding instructions.
4197 (define_int_attr frint_suffix [(UNSPEC_FRINTZ "z") (UNSPEC_FRINTP "p")
4198 (UNSPEC_FRINTM "m") (UNSPEC_FRINTI "i")
4199 (UNSPEC_FRINTX "x") (UNSPEC_FRINTA "a")
4200 (UNSPEC_FRINTN "n")])
4202 (define_int_attr fcvt_pattern [(UNSPEC_FRINTZ "btrunc") (UNSPEC_FRINTA "round")
4203 (UNSPEC_FRINTP "ceil") (UNSPEC_FRINTM "floor")
4204 (UNSPEC_FRINTN "frintn")])
4206 (define_int_attr fcvt_fixed_insn [(UNSPEC_SCVTF "scvtf")
4207 (UNSPEC_UCVTF "ucvtf")
4208 (UNSPEC_FCVTZS "fcvtzs")
4209 (UNSPEC_FCVTZU "fcvtzu")])
4211 ;; Pointer authentication mnemonic prefix.
4212 (define_int_attr pauth_mnem_prefix [(UNSPEC_PACIASP "pacia")
4213 (UNSPEC_PACIBSP "pacib")
4214 (UNSPEC_PACIA1716 "pacia")
4215 (UNSPEC_PACIB1716 "pacib")
4216 (UNSPEC_AUTIASP "autia")
4217 (UNSPEC_AUTIBSP "autib")
4218 (UNSPEC_AUTIA1716 "autia")
4219 (UNSPEC_AUTIB1716 "autib")])
4221 (define_int_attr pauth_key [(UNSPEC_PACIASP "AARCH64_KEY_A")
4222 (UNSPEC_PACIBSP "AARCH64_KEY_B")
4223 (UNSPEC_PACIA1716 "AARCH64_KEY_A")
4224 (UNSPEC_PACIB1716 "AARCH64_KEY_B")
4225 (UNSPEC_AUTIASP "AARCH64_KEY_A")
4226 (UNSPEC_AUTIBSP "AARCH64_KEY_B")
4227 (UNSPEC_AUTIA1716 "AARCH64_KEY_A")
4228 (UNSPEC_AUTIB1716 "AARCH64_KEY_B")])
4230 ;; Pointer authentication HINT number for NOP space instructions using A and
4232 (define_int_attr pauth_hint_num [(UNSPEC_PACIASP "25")
4233 (UNSPEC_PACIBSP "27")
4234 (UNSPEC_AUTIASP "29")
4235 (UNSPEC_AUTIBSP "31")
4236 (UNSPEC_PACIA1716 "8")
4237 (UNSPEC_PACIB1716 "10")
4238 (UNSPEC_AUTIA1716 "12")
4239 (UNSPEC_AUTIB1716 "14")])
4241 (define_int_attr perm_insn [(UNSPEC_ZIP1 "zip1") (UNSPEC_ZIP2 "zip2")
4242 (UNSPEC_ZIP1Q "zip1") (UNSPEC_ZIP2Q "zip2")
4243 (UNSPEC_ZIPQ1 "zipq1") (UNSPEC_ZIPQ2 "zipq2")
4244 (UNSPEC_TRN1 "trn1") (UNSPEC_TRN2 "trn2")
4245 (UNSPEC_TRN1Q "trn1") (UNSPEC_TRN2Q "trn2")
4246 (UNSPEC_UZP1 "uzp1") (UNSPEC_UZP2 "uzp2")
4247 (UNSPEC_UZP1Q "uzp1") (UNSPEC_UZP2Q "uzp2")
4248 (UNSPEC_UZPQ1 "uzpq1") (UNSPEC_UZPQ2 "uzpq2")
4249 (UNSPEC_UZP "uzp") (UNSPEC_UZPQ "uzp")
4250 (UNSPEC_ZIP "zip") (UNSPEC_ZIPQ "zip")
4251 (UNSPEC_TBL "tbl") (UNSPEC_TBLQ "tblq")
4252 (UNSPEC_TBX "tbx") (UNSPEC_TBXQ "tbxq")])
4254 ; op code for REV instructions (size within which elements are reversed).
4255 (define_int_attr rev_op [(UNSPEC_REV64 "64") (UNSPEC_REV32 "32")
4256 (UNSPEC_REV16 "16")])
4258 (define_int_attr perm_hilo [(UNSPEC_UNPACKSHI "hi") (UNSPEC_UNPACKUHI "hi")
4259 (UNSPEC_UNPACKSLO "lo") (UNSPEC_UNPACKULO "lo")])
4261 ;; Return true if the associated optab refers to the high-numbered lanes,
4262 ;; false if it refers to the low-numbered lanes. The convention is for
4263 ;; "hi" to refer to the low-numbered lanes (the first ones in memory)
4265 (define_int_attr hi_lanes_optab [(UNSPEC_UNPACKSHI "!BYTES_BIG_ENDIAN")
4266 (UNSPEC_UNPACKUHI "!BYTES_BIG_ENDIAN")
4267 (UNSPEC_UNPACKSLO "BYTES_BIG_ENDIAN")
4268 (UNSPEC_UNPACKULO "BYTES_BIG_ENDIAN")])
4270 (define_int_attr crc_variant [(UNSPEC_CRC32B "crc32b") (UNSPEC_CRC32H "crc32h")
4271 (UNSPEC_CRC32W "crc32w") (UNSPEC_CRC32X "crc32x")
4272 (UNSPEC_CRC32CB "crc32cb") (UNSPEC_CRC32CH "crc32ch")
4273 (UNSPEC_CRC32CW "crc32cw") (UNSPEC_CRC32CX "crc32cx")])
4275 (define_int_attr crc_mode [(UNSPEC_CRC32B "QI") (UNSPEC_CRC32H "HI")
4276 (UNSPEC_CRC32W "SI") (UNSPEC_CRC32X "DI")
4277 (UNSPEC_CRC32CB "QI") (UNSPEC_CRC32CH "HI")
4278 (UNSPEC_CRC32CW "SI") (UNSPEC_CRC32CX "DI")])
4280 (define_int_attr aes_op [(UNSPEC_AESE "e") (UNSPEC_AESD "d")])
4281 (define_int_attr aesmc_op [(UNSPEC_AESMC "mc") (UNSPEC_AESIMC "imc")])
4283 (define_int_attr sha1_op [(UNSPEC_SHA1C "c") (UNSPEC_SHA1P "p")
4284 (UNSPEC_SHA1M "m")])
4286 (define_int_attr sha256_op [(UNSPEC_SHA256H "") (UNSPEC_SHA256H2 "2")])
4288 (define_int_attr rdma_as [(UNSPEC_SQRDMLAH "a") (UNSPEC_SQRDMLSH "s")])
4290 (define_int_attr sha512_op [(UNSPEC_SHA512H "") (UNSPEC_SHA512H2 "2")])
4292 (define_int_attr sm3tt_op [(UNSPEC_SM3TT1A "1a") (UNSPEC_SM3TT1B "1b")
4293 (UNSPEC_SM3TT2A "2a") (UNSPEC_SM3TT2B "2b")])
4295 (define_int_attr sm3part_op [(UNSPEC_SM3PARTW1 "1") (UNSPEC_SM3PARTW2 "2")])
4297 (define_int_attr f16mac1 [(UNSPEC_FMLAL "a") (UNSPEC_FMLSL "s")
4298 (UNSPEC_FMLAL2 "a") (UNSPEC_FMLSL2 "s")])
4300 (define_int_attr frintnzs_op [(UNSPEC_FRINT32Z "frint32z") (UNSPEC_FRINT32X "frint32x")
4301 (UNSPEC_FRINT64Z "frint64z") (UNSPEC_FRINT64X "frint64x")])
4303 (define_int_attr faminmax_cond_uns_op
4304 [(UNSPEC_COND_SMAX "famax") (UNSPEC_COND_SMIN "famin")])
4306 (define_int_attr faminmax_uns_op
4307 [(UNSPEC_FAMAX "famax") (UNSPEC_FAMIN "famin")])
4309 ;; The condition associated with an UNSPEC_COND_<xx>.
4310 (define_int_attr cmp_op [(UNSPEC_COND_CMPEQ_WIDE "eq")
4311 (UNSPEC_COND_CMPGE_WIDE "ge")
4312 (UNSPEC_COND_CMPGT_WIDE "gt")
4313 (UNSPEC_COND_CMPHI_WIDE "hi")
4314 (UNSPEC_COND_CMPHS_WIDE "hs")
4315 (UNSPEC_COND_CMPLE_WIDE "le")
4316 (UNSPEC_COND_CMPLO_WIDE "lo")
4317 (UNSPEC_COND_CMPLS_WIDE "ls")
4318 (UNSPEC_COND_CMPLT_WIDE "lt")
4319 (UNSPEC_COND_CMPNE_WIDE "ne")
4320 (UNSPEC_COND_FCMEQ "eq")
4321 (UNSPEC_COND_FCMGE "ge")
4322 (UNSPEC_COND_FCMGT "gt")
4323 (UNSPEC_COND_FCMLE "le")
4324 (UNSPEC_COND_FCMLT "lt")
4325 (UNSPEC_COND_FCMNE "ne")
4326 (UNSPEC_WHILEGE "ge")
4327 (UNSPEC_WHILEGT "gt")
4328 (UNSPEC_WHILEHI "hi")
4329 (UNSPEC_WHILEHS "hs")
4330 (UNSPEC_WHILELE "le")
4331 (UNSPEC_WHILELO "lo")
4332 (UNSPEC_WHILELS "ls")
4333 (UNSPEC_WHILELT "lt")
4334 (UNSPEC_WHILERW "rw")
4335 (UNSPEC_WHILEWR "wr")])
4337 (define_int_attr while_optab_cmp [(UNSPEC_WHILEGE "ge")
4338 (UNSPEC_WHILEGT "gt")
4339 (UNSPEC_WHILEHI "ugt")
4340 (UNSPEC_WHILEHS "uge")
4341 (UNSPEC_WHILELE "le")
4342 (UNSPEC_WHILELO "ult")
4343 (UNSPEC_WHILELS "ule")
4344 (UNSPEC_WHILELT "lt")
4345 (UNSPEC_WHILERW "rw")
4346 (UNSPEC_WHILEWR "wr")])
4348 (define_int_attr raw_war [(UNSPEC_WHILERW "raw")
4349 (UNSPEC_WHILEWR "war")])
4351 (define_int_attr brk_op [(UNSPEC_BRKA "a") (UNSPEC_BRKB "b")
4353 (UNSPEC_BRKPA "pa") (UNSPEC_BRKPB "pb")])
4355 (define_int_attr sve_pred_op [(UNSPEC_PFIRST "pfirst") (UNSPEC_PNEXT "pnext")])
4357 (define_int_attr sve_int_op [(UNSPEC_ADCLB "adclb")
4358 (UNSPEC_ADCLT "adclt")
4359 (UNSPEC_ADDHNB "addhnb")
4360 (UNSPEC_ADDHNT "addhnt")
4361 (UNSPEC_ADDP "addp")
4362 (UNSPEC_ANDV "andv")
4363 (UNSPEC_ASHIFTRT_WIDE "asr")
4364 (UNSPEC_ASHIFT_WIDE "lsl")
4365 (UNSPEC_ASRD "asrd")
4366 (UNSPEC_BDEP "bdep")
4367 (UNSPEC_BEXT "bext")
4368 (UNSPEC_BGRP "bgrp")
4369 (UNSPEC_CADD90 "cadd")
4370 (UNSPEC_CADD270 "cadd")
4371 (UNSPEC_CDOT "cdot")
4372 (UNSPEC_CDOT90 "cdot")
4373 (UNSPEC_CDOT180 "cdot")
4374 (UNSPEC_CDOT270 "cdot")
4375 (UNSPEC_CMLA "cmla")
4376 (UNSPEC_CMLA90 "cmla")
4377 (UNSPEC_CMLA180 "cmla")
4378 (UNSPEC_CMLA270 "cmla")
4379 (UNSPEC_EORBT "eorbt")
4380 (UNSPEC_EORTB "eortb")
4382 (UNSPEC_LSHIFTRT_WIDE "lsr")
4383 (UNSPEC_MATCH "match")
4384 (UNSPEC_NMATCH "nmatch")
4385 (UNSPEC_PMULLB "pmullb")
4386 (UNSPEC_PMULLB_PAIR "pmullb")
4387 (UNSPEC_PMULLT "pmullt")
4388 (UNSPEC_PMULLT_PAIR "pmullt")
4389 (UNSPEC_RADDHNB "raddhnb")
4390 (UNSPEC_RADDHNT "raddhnt")
4391 (UNSPEC_REVB "revb")
4392 (UNSPEC_REVH "revh")
4393 (UNSPEC_REVW "revw")
4394 (UNSPEC_RSHRNB "rshrnb")
4395 (UNSPEC_RSHRNT "rshrnt")
4396 (UNSPEC_RSQRTE "ursqrte")
4397 (UNSPEC_RSUBHNB "rsubhnb")
4398 (UNSPEC_RSUBHNT "rsubhnt")
4399 (UNSPEC_SABDLB "sabdlb")
4400 (UNSPEC_SABDLT "sabdlt")
4401 (UNSPEC_SADALP "sadalp")
4402 (UNSPEC_SADDLB "saddlb")
4403 (UNSPEC_SADDLBT "saddlbt")
4404 (UNSPEC_SADDLT "saddlt")
4405 (UNSPEC_SADDWB "saddwb")
4406 (UNSPEC_SADDWT "saddwt")
4407 (UNSPEC_SBCLB "sbclb")
4408 (UNSPEC_SBCLT "sbclt")
4409 (UNSPEC_SHADD "shadd")
4410 (UNSPEC_SHRNB "shrnb")
4411 (UNSPEC_SHRNT "shrnt")
4412 (UNSPEC_SHSUB "shsub")
4414 (UNSPEC_SMAXP "smaxp")
4415 (UNSPEC_SMAXV "smaxv")
4416 (UNSPEC_SMINP "sminp")
4417 (UNSPEC_SMINV "sminv")
4418 (UNSPEC_SMUL_HIGHPART "smulh")
4419 (UNSPEC_SMULLB "smullb")
4420 (UNSPEC_SMULLT "smullt")
4421 (UNSPEC_SQCADD90 "sqcadd")
4422 (UNSPEC_SQCADD270 "sqcadd")
4423 (UNSPEC_SQDMULH "sqdmulh")
4424 (UNSPEC_SQDMULLB "sqdmullb")
4425 (UNSPEC_SQDMULLBT "sqdmullbt")
4426 (UNSPEC_SQDMULLT "sqdmullt")
4427 (UNSPEC_SQRDCMLAH "sqrdcmlah")
4428 (UNSPEC_SQRDCMLAH90 "sqrdcmlah")
4429 (UNSPEC_SQRDCMLAH180 "sqrdcmlah")
4430 (UNSPEC_SQRDCMLAH270 "sqrdcmlah")
4431 (UNSPEC_SQRDMLAH "sqrdmlah")
4432 (UNSPEC_SQRDMLSH "sqrdmlsh")
4433 (UNSPEC_SQRDMULH "sqrdmulh")
4434 (UNSPEC_SQRSHL "sqrshl")
4435 (UNSPEC_SQRSHR "sqrshr")
4436 (UNSPEC_SQRSHRN "sqrshrn")
4437 (UNSPEC_SQRSHRNB "sqrshrnb")
4438 (UNSPEC_SQRSHRNT "sqrshrnt")
4439 (UNSPEC_SQRSHRU "sqrshru")
4440 (UNSPEC_SQRSHRUN "sqrshrun")
4441 (UNSPEC_SQRSHRUNB "sqrshrunb")
4442 (UNSPEC_SQRSHRUNT "sqrshrunt")
4443 (UNSPEC_SQSHL "sqshl")
4444 (UNSPEC_SQSHLU "sqshlu")
4445 (UNSPEC_SQSHRNB "sqshrnb")
4446 (UNSPEC_SQSHRNT "sqshrnt")
4447 (UNSPEC_SQSHRUNB "sqshrunb")
4448 (UNSPEC_SQSHRUNT "sqshrunt")
4449 (UNSPEC_SQXTNB "sqxtnb")
4450 (UNSPEC_SQXTNT "sqxtnt")
4451 (UNSPEC_SQXTUNB "sqxtunb")
4452 (UNSPEC_SQXTUNT "sqxtunt")
4453 (UNSPEC_SRHADD "srhadd")
4455 (UNSPEC_SRSHL "srshl")
4456 (UNSPEC_SRSHR "srshr")
4457 (UNSPEC_SSHLLB "sshllb")
4458 (UNSPEC_SSHLLT "sshllt")
4459 (UNSPEC_SSUBLB "ssublb")
4460 (UNSPEC_SSUBLBT "ssublbt")
4461 (UNSPEC_SSUBLT "ssublt")
4462 (UNSPEC_SSUBLTB "ssubltb")
4463 (UNSPEC_SSUBWB "ssubwb")
4464 (UNSPEC_SSUBWT "ssubwt")
4465 (UNSPEC_SUBHNB "subhnb")
4466 (UNSPEC_SUBHNT "subhnt")
4467 (UNSPEC_SUQADD "suqadd")
4468 (UNSPEC_UABDLB "uabdlb")
4469 (UNSPEC_UABDLT "uabdlt")
4470 (UNSPEC_UADALP "uadalp")
4471 (UNSPEC_UADDLB "uaddlb")
4472 (UNSPEC_UADDLT "uaddlt")
4473 (UNSPEC_UADDWB "uaddwb")
4474 (UNSPEC_UADDWT "uaddwt")
4475 (UNSPEC_UHADD "uhadd")
4476 (UNSPEC_UHSUB "uhsub")
4477 (UNSPEC_UMAXP "umaxp")
4478 (UNSPEC_UMAXV "umaxv")
4479 (UNSPEC_UMINP "uminp")
4480 (UNSPEC_UMINV "uminv")
4481 (UNSPEC_UMUL_HIGHPART "umulh")
4482 (UNSPEC_UMULLB "umullb")
4483 (UNSPEC_UMULLT "umullt")
4484 (UNSPEC_UQRSHL "uqrshl")
4485 (UNSPEC_UQRSHR "uqrshr")
4486 (UNSPEC_UQRSHRN "uqrshrn")
4487 (UNSPEC_UQRSHRNB "uqrshrnb")
4488 (UNSPEC_UQRSHRNT "uqrshrnt")
4489 (UNSPEC_UQSHL "uqshl")
4490 (UNSPEC_UQSHRNB "uqshrnb")
4491 (UNSPEC_UQSHRNT "uqshrnt")
4492 (UNSPEC_UQXTNB "uqxtnb")
4493 (UNSPEC_UQXTNT "uqxtnt")
4494 (UNSPEC_URECPE "urecpe")
4495 (UNSPEC_URHADD "urhadd")
4496 (UNSPEC_URSHL "urshl")
4497 (UNSPEC_URSHR "urshr")
4498 (UNSPEC_USHLLB "ushllb")
4499 (UNSPEC_USHLLT "ushllt")
4500 (UNSPEC_USQADD "usqadd")
4501 (UNSPEC_USUBLB "usublb")
4502 (UNSPEC_USUBLT "usublt")
4503 (UNSPEC_USUBWB "usubwb")
4504 (UNSPEC_USUBWT "usubwt")
4505 (UNSPEC_XORV "eorv")])
4507 (define_int_attr sve_int_op_rev [(UNSPEC_SHADD "shadd")
4508 (UNSPEC_SHSUB "shsubr")
4509 (UNSPEC_SQRSHL "sqrshlr")
4510 (UNSPEC_SRHADD "srhadd")
4511 (UNSPEC_SRSHL "srshlr")
4512 (UNSPEC_UHADD "uhadd")
4513 (UNSPEC_UHSUB "uhsubr")
4514 (UNSPEC_UQRSHL "uqrshlr")
4515 (UNSPEC_URHADD "urhadd")
4516 (UNSPEC_URSHL "urshlr")])
4518 (define_int_attr sve_int_add_op [(UNSPEC_SABDLB "sabalb")
4519 (UNSPEC_SABDLT "sabalt")
4520 (UNSPEC_SMULLB "smlalb")
4521 (UNSPEC_SMULLT "smlalt")
4522 (UNSPEC_UABDLB "uabalb")
4523 (UNSPEC_UABDLT "uabalt")
4524 (UNSPEC_UMULLB "umlalb")
4525 (UNSPEC_UMULLT "umlalt")])
4527 (define_int_attr sve_int_qadd_op [(UNSPEC_SQDMULLB "sqdmlalb")
4528 (UNSPEC_SQDMULLBT "sqdmlalbt")
4529 (UNSPEC_SQDMULLT "sqdmlalt")])
4531 (define_int_attr sve_int_sub_op [(UNSPEC_SMULLB "smlslb")
4532 (UNSPEC_SMULLT "smlslt")
4533 (UNSPEC_UMULLB "umlslb")
4534 (UNSPEC_UMULLT "umlslt")])
4536 (define_int_attr sve_int_qsub_op [(UNSPEC_SQDMULLB "sqdmlslb")
4537 (UNSPEC_SQDMULLBT "sqdmlslbt")
4538 (UNSPEC_SQDMULLT "sqdmlslt")])
4540 (define_int_attr sve_fp_op [(UNSPEC_BFDOT "bfdot")
4541 (UNSPEC_BFMLALB "bfmlalb")
4542 (UNSPEC_BFMLALT "bfmlalt")
4543 (UNSPEC_BFMLSLB "bfmlslb")
4544 (UNSPEC_BFMLSLT "bfmlslt")
4545 (UNSPEC_BFMMLA "bfmmla")
4546 (UNSPEC_FRECPE "frecpe")
4547 (UNSPEC_FRECPS "frecps")
4548 (UNSPEC_RSQRTE "frsqrte")
4549 (UNSPEC_RSQRTS "frsqrts")
4550 (UNSPEC_FADDP "faddp")
4551 (UNSPEC_FADDV "faddv")
4552 (UNSPEC_FEXPA "fexpa")
4553 (UNSPEC_FMAXNMP "fmaxnmp")
4554 (UNSPEC_FMAXNMV "fmaxnmv")
4555 (UNSPEC_FMAXP "fmaxp")
4556 (UNSPEC_FMAXV "fmaxv")
4557 (UNSPEC_FMINNMP "fminnmp")
4558 (UNSPEC_FMINNMV "fminnmv")
4559 (UNSPEC_FMINP "fminp")
4560 (UNSPEC_FMINV "fminv")
4561 (UNSPEC_FMLA "fmla")
4562 (UNSPEC_FMLALB "fmlalb")
4563 (UNSPEC_FMLALT "fmlalt")
4564 (UNSPEC_FMLS "fmls")
4565 (UNSPEC_FMLSLB "fmlslb")
4566 (UNSPEC_FMLSLT "fmlslt")
4567 (UNSPEC_FMMLA "fmmla")
4568 (UNSPEC_FTSMUL "ftsmul")
4569 (UNSPEC_FTSSEL "ftssel")
4570 (UNSPEC_COND_FABS "fabs")
4571 (UNSPEC_COND_FADD "fadd")
4572 (UNSPEC_COND_FAMAX "famax")
4573 (UNSPEC_COND_FAMIN "famin")
4574 (UNSPEC_COND_FCVTLT "fcvtlt")
4575 (UNSPEC_COND_FCVTX "fcvtx")
4576 (UNSPEC_COND_FDIV "fdiv")
4577 (UNSPEC_COND_FLOGB "flogb")
4578 (UNSPEC_COND_FMAX "fmax")
4579 (UNSPEC_COND_FMAXNM "fmaxnm")
4580 (UNSPEC_COND_FMIN "fmin")
4581 (UNSPEC_COND_FMINNM "fminnm")
4582 (UNSPEC_COND_FMUL "fmul")
4583 (UNSPEC_COND_FMULX "fmulx")
4584 (UNSPEC_COND_FNEG "fneg")
4585 (UNSPEC_COND_FRECPX "frecpx")
4586 (UNSPEC_COND_FRINTA "frinta")
4587 (UNSPEC_COND_FRINTI "frinti")
4588 (UNSPEC_COND_FRINTM "frintm")
4589 (UNSPEC_COND_FRINTN "frintn")
4590 (UNSPEC_COND_FRINTP "frintp")
4591 (UNSPEC_COND_FRINTX "frintx")
4592 (UNSPEC_COND_FRINTZ "frintz")
4593 (UNSPEC_COND_FSCALE "fscale")
4594 (UNSPEC_COND_FSQRT "fsqrt")
4595 (UNSPEC_COND_FSUB "fsub")
4596 (UNSPEC_COND_SMAX "fmaxnm")
4597 (UNSPEC_COND_SMIN "fminnm")])
4599 (define_int_attr sve_fp_op_rev [(UNSPEC_COND_FADD "fadd")
4600 (UNSPEC_COND_FAMAX "famax")
4601 (UNSPEC_COND_FAMIN "famin")
4602 (UNSPEC_COND_FDIV "fdivr")
4603 (UNSPEC_COND_FMAX "fmax")
4604 (UNSPEC_COND_FMAXNM "fmaxnm")
4605 (UNSPEC_COND_FMIN "fmin")
4606 (UNSPEC_COND_FMINNM "fminnm")
4607 (UNSPEC_COND_FMUL "fmul")
4608 (UNSPEC_COND_FMULX "fmulx")
4609 (UNSPEC_COND_FSUB "fsubr")
4610 (UNSPEC_COND_SMAX "fmaxnm")
4611 (UNSPEC_COND_SMIN "fminnm")])
4613 (define_int_attr sme_int_op [(UNSPEC_SME_ADD_WRITE "add")
4614 (UNSPEC_SME_SUB_WRITE "sub")])
4616 (define_int_attr rot [(UNSPEC_CADD90 "90")
4617 (UNSPEC_CADD270 "270")
4619 (UNSPEC_CDOT90 "90")
4620 (UNSPEC_CDOT180 "180")
4621 (UNSPEC_CDOT270 "270")
4623 (UNSPEC_CMLA90 "90")
4624 (UNSPEC_CMLA180 "180")
4625 (UNSPEC_CMLA270 "270")
4626 (UNSPEC_FCADD90 "90")
4627 (UNSPEC_FCADD270 "270")
4629 (UNSPEC_FCMLA90 "90")
4630 (UNSPEC_FCMLA180 "180")
4631 (UNSPEC_FCMLA270 "270")
4632 (UNSPEC_SQCADD90 "90")
4633 (UNSPEC_SQCADD270 "270")
4634 (UNSPEC_SQRDCMLAH "0")
4635 (UNSPEC_SQRDCMLAH90 "90")
4636 (UNSPEC_SQRDCMLAH180 "180")
4637 (UNSPEC_SQRDCMLAH270 "270")
4638 (UNSPEC_COND_FCADD90 "90")
4639 (UNSPEC_COND_FCADD270 "270")
4640 (UNSPEC_COND_FCMLA "0")
4641 (UNSPEC_COND_FCMLA90 "90")
4642 (UNSPEC_COND_FCMLA180 "180")
4643 (UNSPEC_COND_FCMLA270 "270")
4645 (UNSPEC_FCMUL_CONJ "180")])
4647 ;; A conjucate is a negation of the imaginary component
4648 ;; The number in the unspecs are the rotation component of the instruction, e.g
4649 ;; FCMLA180 means use the instruction with #180.
4650 ;; The iterator is used to produce the right name mangling for the function.
4651 (define_int_attr conj_op [(UNSPEC_FCMLA180 "")
4652 (UNSPEC_FCMLA180_CONJ "_conj")
4654 (UNSPEC_FCMLA_CONJ "_conj")
4656 (UNSPEC_FCMUL_CONJ "_conj")
4659 (UNSPEC_CMLA180_CONJ "_conj")
4660 (UNSPEC_CMLA_CONJ "_conj")
4662 (UNSPEC_CMUL_CONJ "_conj")])
4664 ;; The complex operations when performed on a real complex number require two
4665 ;; instructions to perform the operation. e.g. complex multiplication requires
4666 ;; two FCMUL with a particular rotation value.
4668 ;; These values can be looked up in rotsplit1 and rotsplit2. as an example
4669 ;; FCMUL needs the first instruction to use #0 and the second #90.
4670 (define_int_attr rotsplit1 [(UNSPEC_FCMLA "0")
4671 (UNSPEC_FCMLA_CONJ "0")
4673 (UNSPEC_FCMUL_CONJ "0")
4674 (UNSPEC_FCMLA180 "180")
4675 (UNSPEC_FCMLA180_CONJ "180")])
4677 (define_int_attr rotsplit2 [(UNSPEC_FCMLA "90")
4678 (UNSPEC_FCMLA_CONJ "270")
4680 (UNSPEC_FCMUL_CONJ "270")
4681 (UNSPEC_FCMLA180 "270")
4682 (UNSPEC_FCMLA180_CONJ "90")])
4684 ;; SVE has slightly different namings from NEON so we have to split these
4686 (define_int_attr sve_rot1 [(UNSPEC_FCMLA "")
4687 (UNSPEC_FCMLA_CONJ "")
4689 (UNSPEC_FCMUL_CONJ "")
4690 (UNSPEC_FCMLA180 "180")
4691 (UNSPEC_FCMLA180_CONJ "180")
4693 (UNSPEC_CMLA_CONJ "")
4695 (UNSPEC_CMUL_CONJ "")
4696 (UNSPEC_CMLA180 "180")
4697 (UNSPEC_CMLA180_CONJ "180")])
4699 (define_int_attr sve_rot2 [(UNSPEC_FCMLA "90")
4700 (UNSPEC_FCMLA_CONJ "270")
4702 (UNSPEC_FCMUL_CONJ "270")
4703 (UNSPEC_FCMLA180 "270")
4704 (UNSPEC_FCMLA180_CONJ "90")
4706 (UNSPEC_CMLA_CONJ "270")
4708 (UNSPEC_CMUL_CONJ "270")
4709 (UNSPEC_CMLA180 "270")
4710 (UNSPEC_CMLA180_CONJ "90")])
4713 (define_int_attr fcmac1 [(UNSPEC_FCMLA "a") (UNSPEC_FCMLA_CONJ "a")
4714 (UNSPEC_FCMLA180 "s") (UNSPEC_FCMLA180_CONJ "s")
4715 (UNSPEC_CMLA "a") (UNSPEC_CMLA_CONJ "a")
4716 (UNSPEC_CMLA180 "s") (UNSPEC_CMLA180_CONJ "s")])
4718 (define_int_attr sve_fmla_op [(UNSPEC_COND_FMLA "fmla")
4719 (UNSPEC_COND_FMLS "fmls")
4720 (UNSPEC_COND_FNMLA "fnmla")
4721 (UNSPEC_COND_FNMLS "fnmls")])
4723 (define_int_attr sve_fmad_op [(UNSPEC_COND_FMLA "fmad")
4724 (UNSPEC_COND_FMLS "fmsb")
4725 (UNSPEC_COND_FNMLA "fnmad")
4726 (UNSPEC_COND_FNMLS "fnmsb")])
4728 (define_int_attr supports_bf16 [(UNSPEC_COND_FADD "true")
4729 (UNSPEC_COND_FAMAX "false")
4730 (UNSPEC_COND_FAMIN "false")
4731 (UNSPEC_COND_FDIV "false")
4732 (UNSPEC_COND_FMAX "true")
4733 (UNSPEC_COND_FMAXNM "true")
4734 (UNSPEC_COND_FMIN "true")
4735 (UNSPEC_COND_FMINNM "true")
4736 (UNSPEC_COND_FMLA "true")
4737 (UNSPEC_COND_FMLS "true")
4738 (UNSPEC_COND_FMUL "true")
4739 (UNSPEC_COND_FMULX "false")
4740 (UNSPEC_COND_FMULX "false")
4741 (UNSPEC_COND_FNMLA "false")
4742 (UNSPEC_COND_FNMLS "false")
4743 (UNSPEC_COND_FSUB "true")
4744 (UNSPEC_COND_SMAX "true")
4745 (UNSPEC_COND_SMIN "true")])
4747 ;; Differs from supports_bf16 only in UNSPEC_COND_FSUB.
4748 (define_int_attr supports_bf16_rev [(UNSPEC_COND_FADD "true")
4749 (UNSPEC_COND_FAMAX "false")
4750 (UNSPEC_COND_FAMIN "false")
4751 (UNSPEC_COND_FDIV "false")
4752 (UNSPEC_COND_FMAX "true")
4753 (UNSPEC_COND_FMAXNM "true")
4754 (UNSPEC_COND_FMIN "true")
4755 (UNSPEC_COND_FMINNM "true")
4756 (UNSPEC_COND_FMLA "true")
4757 (UNSPEC_COND_FMLS "true")
4758 (UNSPEC_COND_FMUL "true")
4759 (UNSPEC_COND_FMULX "false")
4760 (UNSPEC_COND_FMULX "false")
4761 (UNSPEC_COND_FNMLA "false")
4762 (UNSPEC_COND_FNMLS "false")
4763 (UNSPEC_COND_FSUB "false")
4764 (UNSPEC_COND_SMAX "true")
4765 (UNSPEC_COND_SMIN "true")])
4767 ;; The register constraint to use for the final operand in a binary BRK.
4768 (define_int_attr brk_reg_con [(UNSPEC_BRKN "0")
4769 (UNSPEC_BRKPA "Upa") (UNSPEC_BRKPB "Upa")])
4771 ;; The register number to print for the above.
4772 (define_int_attr brk_reg_opno [(UNSPEC_BRKN "0")
4773 (UNSPEC_BRKPA "3") (UNSPEC_BRKPB "3")])
4775 ;; The predicate to use for the first input operand in a floating-point
4776 ;; <optab><mode>3 pattern.
4777 (define_int_attr sve_pred_fp_rhs1_operand
4778 [(UNSPEC_COND_FADD "register_operand")
4779 (UNSPEC_COND_FAMAX "register_operand")
4780 (UNSPEC_COND_FAMIN "register_operand")
4781 (UNSPEC_COND_FDIV "register_operand")
4782 (UNSPEC_COND_FMAX "register_operand")
4783 (UNSPEC_COND_FMAXNM "register_operand")
4784 (UNSPEC_COND_FMIN "register_operand")
4785 (UNSPEC_COND_FMINNM "register_operand")
4786 (UNSPEC_COND_FMUL "register_operand")
4787 (UNSPEC_COND_FMULX "register_operand")
4788 (UNSPEC_COND_FSUB "aarch64_sve_float_arith_operand")
4789 (UNSPEC_COND_SMAX "register_operand")
4790 (UNSPEC_COND_SMIN "register_operand")])
4792 ;; The predicate to use for the second input operand in a floating-point
4793 ;; <optab><mode>3 pattern.
4794 (define_int_attr sve_pred_fp_rhs2_operand
4795 [(UNSPEC_COND_FADD "aarch64_sve_float_arith_with_sub_operand")
4796 (UNSPEC_COND_FAMAX "register_operand")
4797 (UNSPEC_COND_FAMIN "register_operand")
4798 (UNSPEC_COND_FDIV "register_operand")
4799 (UNSPEC_COND_FMAX "aarch64_sve_float_maxmin_operand")
4800 (UNSPEC_COND_FMAXNM "aarch64_sve_float_maxmin_operand")
4801 (UNSPEC_COND_FMIN "aarch64_sve_float_maxmin_operand")
4802 (UNSPEC_COND_FMINNM "aarch64_sve_float_maxmin_operand")
4803 (UNSPEC_COND_FMUL "aarch64_sve_float_mul_operand")
4804 (UNSPEC_COND_FMULX "register_operand")
4805 (UNSPEC_COND_FSUB "register_operand")
4806 (UNSPEC_COND_SMAX "aarch64_sve_float_maxmin_operand")
4807 (UNSPEC_COND_SMIN "aarch64_sve_float_maxmin_operand")])
4809 ;; Likewise for immediates only.
4810 (define_int_attr sve_pred_fp_rhs2_immediate
4811 [(UNSPEC_COND_FMAX "aarch64_sve_float_maxmin_immediate")
4812 (UNSPEC_COND_FMAXNM "aarch64_sve_float_maxmin_immediate")
4813 (UNSPEC_COND_FMIN "aarch64_sve_float_maxmin_immediate")
4814 (UNSPEC_COND_FMINNM "aarch64_sve_float_maxmin_immediate")
4815 (UNSPEC_COND_FMUL "aarch64_sve_float_mul_immediate")
4816 (UNSPEC_COND_SMAX "aarch64_sve_float_maxmin_immediate")
4817 (UNSPEC_COND_SMIN "aarch64_sve_float_maxmin_immediate")])
4819 ;; The maximum number of element bits that an instruction can handle.
4820 (define_int_attr max_elem_bits [(UNSPEC_UADDV "64") (UNSPEC_SADDV "32")
4821 (UNSPEC_PFIRST "8") (UNSPEC_PNEXT "64")])
4823 ;; The minimum number of element bits that an instruction can handle.
4824 (define_int_attr min_elem_bits [(UNSPEC_REVB "16")
4826 (UNSPEC_REVW "64")])
4828 (define_int_attr unspec [(UNSPEC_WHILERW "UNSPEC_WHILERW")
4829 (UNSPEC_WHILEWR "UNSPEC_WHILEWR")])
4831 (define_int_attr hv [(UNSPEC_SME_LD1_HOR "h")
4832 (UNSPEC_SME_LD1_VER "v")
4833 (UNSPEC_SME_READ_HOR "h")
4834 (UNSPEC_SME_READ_VER "v")
4835 (UNSPEC_SME_READZ_HOR "h")
4836 (UNSPEC_SME_READZ_VER "v")
4837 (UNSPEC_SME_ST1_HOR "h")
4838 (UNSPEC_SME_ST1_VER "v")
4839 (UNSPEC_SME_WRITE_HOR "h")
4840 (UNSPEC_SME_WRITE_VER "v")])
4842 (define_int_attr has_16bit_form [(UNSPEC_SME_SDOT "true")
4843 (UNSPEC_SME_SVDOT "true")
4844 (UNSPEC_SME_UDOT "true")
4845 (UNSPEC_SME_UVDOT "true")
4846 (UNSPEC_SME_SUDOT "false")
4847 (UNSPEC_SME_SUVDOT "false")
4848 (UNSPEC_SME_USDOT "false")
4849 (UNSPEC_SME_USVDOT "false")])
4851 ;; Iterators and attributes for fpcr fpsr getter setters
4853 (define_int_attr fpscr_name
4854 [(UNSPECV_GET_FPSR "fpsr")
4855 (UNSPECV_SET_FPSR "fpsr")
4856 (UNSPECV_GET_FPCR "fpcr")
4857 (UNSPECV_SET_FPCR "fpcr")])
4859 (define_int_attr bits_etype [(8 "b") (16 "h") (32 "s") (64 "d")])
4861 (define_int_attr atomic_ldop
4862 [(UNSPECV_ATOMIC_LDOP_OR "set") (UNSPECV_ATOMIC_LDOP_BIC "clr")
4863 (UNSPECV_ATOMIC_LDOP_XOR "eor") (UNSPECV_ATOMIC_LDOP_PLUS "add")])
4865 (define_int_attr atomic_ldoptab
4866 [(UNSPECV_ATOMIC_LDOP_OR "ior") (UNSPECV_ATOMIC_LDOP_BIC "bic")
4867 (UNSPECV_ATOMIC_LDOP_XOR "xor") (UNSPECV_ATOMIC_LDOP_PLUS "add")])
4869 (define_int_attr fp8_cvt_uns_op
4870 [(UNSPEC_F1CVT "f1cvt")
4871 (UNSPEC_F2CVT "f2cvt")
4872 (UNSPEC_F1CVTLT "f1cvtlt")
4873 (UNSPEC_F2CVTLT "f2cvtlt")])