libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / config / aarch64 / iterators.md
blobefba78375c26d6a22bb1554ddccd1cec171c099a
1 ;; Machine description for AArch64 architecture.
2 ;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
3 ;; Contributed by ARM Ltd.
4 ;;
5 ;; This file is part of GCC.
6 ;;
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)
10 ;; any later version.
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 ;; -------------------------------------------------------------------
22 ;; Mode Iterators
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])
45 ;; Iterator for all integer modes (up to 64-bit)
46 (define_mode_iterator ALLI [QI HI SI DI])
48 ;; Iterator for all integer modes (up to 128-bit)
49 (define_mode_iterator ALLI_TI [QI HI SI DI TI])
51 ;; Iterator for all integer modes that can be extended (up to 64-bit)
52 (define_mode_iterator ALLX [QI HI SI])
54 ;; Iterator for General Purpose Floating-point registers (32- and 64-bit modes)
55 (define_mode_iterator GPF [SF DF])
57 ;; Iterator for all scalar floating point modes (HF, SF, DF)
58 (define_mode_iterator GPF_F16 [(HF "TARGET_FP_F16INST") SF DF])
60 ;; Iterator for all scalar floating point modes (HF, SF, DF)
61 (define_mode_iterator GPF_HF [HF SF DF])
63 ;; Iterator for all 16-bit scalar floating point modes (HF, BF)
64 (define_mode_iterator HFBF [HF BF])
66 ;; Iterator for all scalar floating point modes suitable for moving, including
67 ;; special BF type and decimal floating point types (HF, SF, DF, TF, BF,
68 ;; SD, DD and TD)
69 (define_mode_iterator GPF_TF_F16_MOV [HF BF SF DF TF SD DD TD])
71 ;; Iterator for scalar 32bit fp modes (SF, SD)
72 (define_mode_iterator SFD [SD SF])
74 ;; Iterator for scalar 64bit fp modes (DF, DD)
75 (define_mode_iterator DFD [DD DF])
77 ;; Iterator for scalar 128bit fp modes (TF, TD)
78 (define_mode_iterator TFD [TD TF])
80 ;; Double vector modes.
81 (define_mode_iterator VDF [V2SF V4HF])
83 ;; Iterator for all scalar floating point modes (SF, DF, TF, SD, DD, and TD)
84 (define_mode_iterator GPF_TF [SF DF TF SD DD TD])
86 ;; Integer Advanced SIMD modes.
87 (define_mode_iterator VDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI])
89 ;; Advanced SIMD and scalar, 64 & 128-bit container, all integer modes.
90 (define_mode_iterator VSDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI QI HI SI DI])
92 ;; Advanced SIMD and scalar, 64 & 128-bit container: all Advanced SIMD
93 ;; integer modes; 64-bit scalar integer mode.
94 (define_mode_iterator VSDQ_I_DI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI DI])
96 ;; Double vector modes.
97 (define_mode_iterator VD [V8QI V4HI V4HF V2SI V2SF V4BF])
99 ;; Double vector modes suitable for moving.  Includes BFmode.
100 (define_mode_iterator VDMOV [V8QI V4HI V4HF V4BF V2SI V2SF])
102 ;; 64-bit modes for operations that implicitly clear the top bits of a Q reg.
103 (define_mode_iterator VDZ [V8QI V4HI V4HF V4BF V2SI V2SF DI DF])
105 ;; All modes stored in registers d0-d31.
106 (define_mode_iterator DREG [V8QI V4HI V4HF V2SI V2SF DF])
108 ;; Copy of the above.
109 (define_mode_iterator DREG2 [DREG])
111 ;; All modes suitable to store/load pair (2 elements) using STP/LDP.
112 (define_mode_iterator VP_2E [V2SI V2SF V2DI V2DF])
114 ;; Advanced SIMD, 64-bit container, all integer modes.
115 (define_mode_iterator VD_BHSI [V8QI V4HI V2SI])
117 ;; 128 and 64-bit container; 8, 16, 32-bit vector integer modes
118 (define_mode_iterator VDQ_BHSI [V8QI V16QI V4HI V8HI V2SI V4SI])
120 ;; Quad vector modes.
121 (define_mode_iterator VQ [V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF])
123 ;; Copy of the above.
124 (define_mode_iterator VQ2 [VQ])
126 ;; Quad vector modes suitable for moving.  Includes BFmode.
127 (define_mode_iterator VQMOV [V16QI V8HI V4SI V2DI V8HF V8BF V4SF V2DF])
129 ;; VQMOV without 2-element modes.
130 (define_mode_iterator VQMOV_NO2E [V16QI V8HI V4SI V8HF V8BF V4SF])
132 ;; Double integer vector modes.
133 (define_mode_iterator VD_I [V8QI V4HI V2SI DI])
135 ;; Quad integer vector modes.
136 (define_mode_iterator VQ_I [V16QI V8HI V4SI V2DI])
138 ;; VQ without 2 element modes.
139 (define_mode_iterator VQ_NO2E [V16QI V8HI V4SI V8HF V4SF V8BF])
141 ;; 2 element quad vector modes.
142 (define_mode_iterator VQ_2E [V2DI V2DF])
144 ;; BFmode vector modes.
145 (define_mode_iterator VBF [V4BF V8BF])
147 ;; This mode iterator allows :P to be used for patterns that operate on
148 ;; addresses in different modes.  In LP64, only DI will match, while in
149 ;; ILP32, either can match.
150 (define_mode_iterator P [(SI "ptr_mode == SImode || Pmode == SImode")
151                          (DI "ptr_mode == DImode || Pmode == DImode")])
153 ;; This mode iterator allows :PTR to be used for patterns that operate on
154 ;; pointer-sized quantities.  Exactly one of the two alternatives will match.
155 (define_mode_iterator PTR [(SI "ptr_mode == SImode") (DI "ptr_mode == DImode")])
157 ;; Advanced SIMD Float modes suitable for moving, loading and storing.
158 (define_mode_iterator VDQF_F16 [V4HF V8HF V2SF V4SF V2DF
159                                 V4BF V8BF])
161 ;; Advanced SIMD Float modes.
162 (define_mode_iterator VDQF [V2SF V4SF V2DF])
163 (define_mode_iterator VHSDF [(V4HF "TARGET_SIMD_F16INST")
164                              (V8HF "TARGET_SIMD_F16INST")
165                              V2SF V4SF V2DF])
167 ;; Advanced SIMD Float modes, and DF.
168 (define_mode_iterator VDQF_DF [V2SF V4SF V2DF DF])
169 (define_mode_iterator VHSDF_DF [(V4HF "TARGET_SIMD_F16INST")
170                                 (V8HF "TARGET_SIMD_F16INST")
171                                 V2SF V4SF V2DF DF])
172 (define_mode_iterator VHSDF_HSDF [(V4HF "TARGET_SIMD_F16INST")
173                                   (V8HF "TARGET_SIMD_F16INST")
174                                   V2SF V4SF V2DF
175                                   (HF "TARGET_SIMD_F16INST")
176                                   SF DF])
178 ;; Scalar and vetor modes for SF, DF.
179 (define_mode_iterator VSFDF [V2SF V4SF V2DF DF SF])
181 ;; Advanced SIMD single Float modes.
182 (define_mode_iterator VDQSF [V2SF V4SF])
184 ;; Quad vector Float modes with half/single elements.
185 (define_mode_iterator VQ_HSF [V8HF V4SF])
187 ;; Modes suitable to use as the return type of a vcond expression.
188 (define_mode_iterator VDQF_COND [V2SF V2SI V4SF V4SI V2DF V2DI])
190 ;; All scalar and Advanced SIMD Float modes.
191 (define_mode_iterator VALLF [V2SF V4SF V2DF SF DF])
193 ;; Advanced SIMD Float modes with 2 elements.
194 (define_mode_iterator V2F [V2SF V2DF])
196 ;; All Advanced SIMD modes on which we support any arithmetic operations.
197 (define_mode_iterator VALL [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF])
199 ;; All Advanced SIMD modes suitable for moving, loading, and storing.
200 (define_mode_iterator VALL_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
201                                 V4HF V8HF V4BF V8BF V2SF V4SF V2DF])
203 ;; The VALL_F16 modes except the 128-bit 2-element ones.
204 (define_mode_iterator VALL_F16_NO_V2Q [V8QI V16QI V4HI V8HI V2SI V4SI
205                                 V4HF V8HF V2SF V4SF])
207 ;; All Advanced SIMD modes barring HF modes, plus DI.
208 (define_mode_iterator VALLDI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF DI])
210 ;; All Advanced SIMD modes and DI.
211 (define_mode_iterator VALLDI_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
212                                   V4HF V8HF V4BF V8BF V2SF V4SF V2DF DI])
214 ;; All Advanced SIMD modes, plus DI and DF.
215 (define_mode_iterator VALLDIF [V8QI V16QI V4HI V8HI V2SI V4SI V4BF V8BF
216                                V2DI V4HF V8HF V2SF V4SF V2DF DI DF])
218 ;; All Advanced SIMD polynomial modes and DI.
219 (define_mode_iterator VALLP [V8QI V16QI V4HI V8HI V2DI DI])
221 ;; All Advanced SIMD polynomial modes.
222 (define_mode_iterator VALLP_NO_DI [V8QI V16QI V4HI V8HI V2DI])
224 ;; Advanced SIMD modes for Integer reduction across lanes.
225 (define_mode_iterator VDQV [V8QI V16QI V4HI V8HI V4SI V2DI])
227 ;; Advanced SIMD modes (except V2DI) for Integer reduction across lanes.
228 (define_mode_iterator VDQV_S [V8QI V16QI V4HI V8HI V4SI])
230 ;; Advanced SIMD modes for Integer reduction across lanes (zero/sign extended).
231 (define_mode_iterator VDQV_E [V8QI V16QI V4HI V8HI])
233 ;; Advanced SIMD modes for Integer widening reduction across lanes.
234 (define_mode_iterator VDQV_L [V8QI V16QI V4HI V8HI V4SI V2SI])
236 ;; All double integer narrow-able modes.
237 (define_mode_iterator VDN [V4HI V2SI DI])
239 ;; All quad integer narrow-able modes.
240 (define_mode_iterator VQN [V8HI V4SI V2DI])
242 ;; Advanced SIMD and scalar 128-bit container: narrowable 16, 32, 64-bit
243 ;; integer modes
244 (define_mode_iterator VSQN_HSDI [V8HI V4SI V2DI HI SI DI])
246 ;; All quad integer widen-able modes.
247 (define_mode_iterator VQW [V16QI V8HI V4SI])
249 ;; Double vector modes for combines.
250 (define_mode_iterator VDC [V8QI V4HI V4BF V4HF V2SI V2SF DI DF])
252 ;; VDC plus SI and SF.
253 (define_mode_iterator VDCSIF [V8QI V4HI V4BF V4HF V2SI V2SF SI SF DI DF])
255 ;; Polynomial modes for vector combines.
256 (define_mode_iterator VDC_P [V8QI V4HI DI])
258 ;; Advanced SIMD modes except double int.
259 (define_mode_iterator VDQIF [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF V2DF])
260 (define_mode_iterator VDQIF_F16 [V8QI V16QI V4HI V8HI V2SI V4SI
261                                  V4HF V8HF V2SF V4SF V2DF])
263 ;; Advanced SIMD modes for S type.
264 (define_mode_iterator VDQ_SI [V2SI V4SI])
266 ;; Advanced SIMD modes for S and D.
267 (define_mode_iterator VDQ_SDI [V2SI V4SI V2DI])
269 ;; Advanced SIMD modes for H, S and D.
270 (define_mode_iterator VDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
271                                 (V8HI "TARGET_SIMD_F16INST")
272                                 V2SI V4SI V2DI])
274 ;; Scalar and Advanced SIMD modes for S and D.
275 (define_mode_iterator VSDQ_SDI [V2SI V4SI V2DI SI DI])
277 ;; Scalar and Advanced SIMD modes for S and D, Advanced SIMD modes for H.
278 (define_mode_iterator VSDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
279                                  (V8HI "TARGET_SIMD_F16INST")
280                                  V2SI V4SI V2DI
281                                  (HI "TARGET_SIMD_F16INST")
282                                  SI DI])
284 ;; Advanced SIMD modes for Q and H types.
285 (define_mode_iterator VDQQH [V8QI V16QI V4HI V8HI])
287 ;; Advanced SIMD modes for H and S types.
288 (define_mode_iterator VDQHS [V4HI V8HI V2SI V4SI])
290 ;; Advanced SIMD modes for H, S and D types.
291 (define_mode_iterator VDQHSD [V4HI V8HI V2SI V4SI V2DI])
293 ;; Advanced SIMD and scalar integer modes for H and S.
294 (define_mode_iterator VSDQ_HSI [V4HI V8HI V2SI V4SI HI SI])
296 ;; Advanced SIMD and scalar 64-bit container: 16, 32-bit integer modes.
297 (define_mode_iterator VSD_HSI [V4HI V2SI HI SI])
299 ;; Advanced SIMD 64-bit container: 16, 32-bit integer modes.
300 (define_mode_iterator VD_HSI [V4HI V2SI])
302 ;; Scalar 64-bit container: 16, 32-bit integer modes
303 (define_mode_iterator SD_HSI [HI SI])
305 ;; Scalar 64-bit container: 16-bit, 32-bit and 64-bit integer modes.
306 (define_mode_iterator SD_HSDI [HI SI DI])
308 ;; Advanced SIMD 64-bit container: 16, 32-bit integer modes.
309 (define_mode_iterator VQ_HSI [V8HI V4SI])
311 ;; All byte modes.
312 (define_mode_iterator VB [V8QI V16QI])
314 ;; 1 and 2 lane DI and DF modes.
315 (define_mode_iterator V12DIF [V1DI V1DF V2DI V2DF])
317 ;; 1 and 2 lane DI mode.
318 (define_mode_iterator V12DI [V1DI V2DI])
320 ;; 2 and 4 lane SI modes.
321 (define_mode_iterator VS [V2SI V4SI])
323 (define_mode_iterator TX [TI TF TD])
325 ;; Duplicate of the above
326 (define_mode_iterator TX2 [TX])
328 (define_mode_iterator VTX [TI TF TD V16QI V8HI V4SI V2DI V8HF V4SF V2DF V8BF])
330 ;; Advanced SIMD opaque structure modes.
331 (define_mode_iterator VSTRUCT [OI CI XI])
333 ;; Advanced SIMD 64-bit 2-vector structure modes.
334 (define_mode_iterator VSTRUCT_2D [V2x8QI V2x4HI V2x2SI V2x1DI
335                                   V2x4HF V2x2SF V2x1DF V2x4BF])
337 ;; Advanced SIMD 64-bit 3-vector structure modes.
338 (define_mode_iterator VSTRUCT_3D [V3x8QI V3x4HI V3x2SI V3x1DI
339                                   V3x4HF V3x2SF V3x1DF V3x4BF])
341 ;; Advanced SIMD 64-bit 4-vector structure modes.
342 (define_mode_iterator VSTRUCT_4D [V4x8QI V4x4HI V4x2SI V4x1DI
343                                   V4x4HF V4x2SF V4x1DF V4x4BF])
345 ;; Advanced SIMD 64-bit vector structure modes.
346 (define_mode_iterator VSTRUCT_D [VSTRUCT_2D VSTRUCT_3D VSTRUCT_4D])
348 ;; Advanced SIMD 64-bit 2-vector structure modes minus V2x1DI and V2x1DF.
349 (define_mode_iterator VSTRUCT_2DNX [V2x8QI V2x4HI V2x2SI V2x4HF
350                                     V2x2SF V2x4BF])
352 ;; Advanced SIMD 64-bit 3-vector structure modes minus V3x1DI and V3x1DF.
353 (define_mode_iterator VSTRUCT_3DNX [V3x8QI V3x4HI V3x2SI V3x4HF
354                                     V3x2SF V3x4BF])
356 ;; Advanced SIMD 64-bit 4-vector structure modes minus V4x1DI and V4x1DF.
357 (define_mode_iterator VSTRUCT_4DNX [V4x8QI V4x4HI V4x2SI V4x4HF
358                                     V4x2SF V4x4BF])
360 ;; Advanced SIMD 64-bit structure modes with 64-bit elements.
361 (define_mode_iterator VSTRUCT_DX [V2x1DI V2x1DF V3x1DI V3x1DF V4x1DI V4x1DF])
363 ;; Advanced SIMD 64-bit 2-vector structure modes with 64-bit elements.
364 (define_mode_iterator VSTRUCT_2DX [V2x1DI V2x1DF])
366 ;; Advanced SIMD 64-bit 3-vector structure modes with 64-bit elements.
367 (define_mode_iterator VSTRUCT_3DX [V3x1DI V3x1DF])
369 ;; Advanced SIMD 64-bit 4-vector structure modes with 64-bit elements.
370 (define_mode_iterator VSTRUCT_4DX [V4x1DI V4x1DF])
372 ;; Advanced SIMD 128-bit 2-vector structure modes.
373 (define_mode_iterator VSTRUCT_2Q [V2x16QI V2x8HI V2x4SI V2x2DI
374                                   V2x8HF V2x4SF V2x2DF V2x8BF])
376 ;; Advanced SIMD 128-bit 3-vector structure modes.
377 (define_mode_iterator VSTRUCT_3Q [V3x16QI V3x8HI V3x4SI V3x2DI
378                                   V3x8HF V3x4SF V3x2DF V3x8BF])
380 ;; Advanced SIMD 128-bit 4-vector structure modes.
381 (define_mode_iterator VSTRUCT_4Q [V4x16QI V4x8HI V4x4SI V4x2DI
382                                   V4x8HF V4x4SF V4x2DF V4x8BF])
384 ;; Advanced SIMD 128-bit vector structure modes.
385 (define_mode_iterator VSTRUCT_Q [VSTRUCT_2Q VSTRUCT_3Q VSTRUCT_4Q])
387 ;; Advanced SIMD 2-vector structure modes.
388 (define_mode_iterator VSTRUCT_2QD [VSTRUCT_2D VSTRUCT_2Q])
390 ;; Advanced SIMD 3-vector structure modes.
391 (define_mode_iterator VSTRUCT_3QD [VSTRUCT_3D VSTRUCT_3Q])
393 ;; Advanced SIMD 4-vector structure modes.
394 (define_mode_iterator VSTRUCT_4QD [VSTRUCT_4D VSTRUCT_4Q])
396 ;; Advanced SIMD vector structure modes.
397 (define_mode_iterator VSTRUCT_QD [VSTRUCT_D VSTRUCT_Q])
399 ;; Double scalar modes
400 (define_mode_iterator DX [DI DF DD])
402 ;; Duplicate of the above
403 (define_mode_iterator DX2 [DX])
405 ;; Single scalar modes
406 (define_mode_iterator SX [SI SF])
408 ;; Duplicate of the above
409 (define_mode_iterator SX2 [SX])
411 ;; Single and double integer and float modes
412 (define_mode_iterator DSX [DF DI SF SI])
415 ;; Modes available for Advanced SIMD <f>mul operations.
416 (define_mode_iterator VMUL [V4HI V8HI V2SI V4SI
417                             (V4HF "TARGET_SIMD_F16INST")
418                             (V8HF "TARGET_SIMD_F16INST")
419                             V2SF V4SF V2DF])
421 ;; The subset of VMUL for which VCOND is a vector mode.
422 (define_mode_iterator VMULD [V4HI V8HI V2SI V4SI
423                              (V4HF "TARGET_SIMD_F16INST")
424                              (V8HF "TARGET_SIMD_F16INST")
425                              V2SF V4SF])
427 ;; Iterators for single modes, for "@" patterns.
428 (define_mode_iterator VNx16QI_ONLY [VNx16QI])
429 (define_mode_iterator VNx16SI_ONLY [VNx16SI])
430 (define_mode_iterator VNx8HI_ONLY [VNx8HI])
431 (define_mode_iterator VNx8BF_ONLY [VNx8BF])
432 (define_mode_iterator VNx8SI_ONLY [VNx8SI])
433 (define_mode_iterator VNx8DI_ONLY [VNx8DI])
434 (define_mode_iterator VNx4SI_ONLY [VNx4SI])
435 (define_mode_iterator VNx4SF_ONLY [VNx4SF])
436 (define_mode_iterator VNx2DI_ONLY [VNx2DI])
437 (define_mode_iterator VNx2DF_ONLY [VNx2DF])
438 (define_mode_iterator VNx1TI_ONLY [VNx1TI])
440 ;; All fully-packed SVE vector modes.
441 (define_mode_iterator SVE_FULL [VNx16QI VNx8HI VNx4SI VNx2DI
442                                 VNx8BF VNx8HF VNx4SF VNx2DF])
444 ;; All fully-packed SVE integer vector modes.
445 (define_mode_iterator SVE_FULL_I [VNx16QI VNx8HI VNx4SI VNx2DI])
447 ;; All fully-packed SVE floating-point vector modes.
448 (define_mode_iterator SVE_FULL_F [VNx8HF VNx4SF VNx2DF])
450 ;; Fully-packed SVE integer vector modes that have 8-bit or 16-bit elements.
451 (define_mode_iterator SVE_FULL_BHI [VNx16QI VNx8HI])
453 ;; Fully-packed SVE integer vector modes that have 8-bit, 16-bit or 32-bit
454 ;; elements.
455 (define_mode_iterator SVE_FULL_BHSI [VNx16QI VNx8HI VNx4SI])
457 ;; Pairs of the above.
458 (define_mode_iterator SVE_FULL_BHSIx2 [VNx32QI VNx16HI VNx8SI])
460 ;; Fully-packed SVE vector modes that have 16-bit float elements.
461 (define_mode_iterator SVE_FULL_HF [VNx8BF VNx8HF])
463 ;; Fully-packed SVE vector modes that have 16-bit, 32-bit or 64-bit elements.
464 (define_mode_iterator SVE_FULL_HSD [VNx8HI VNx4SI VNx2DI
465                                     VNx8BF VNx8HF VNx4SF VNx2DF])
467 ;; Fully-packed SVE integer vector modes that have 16-bit, 32-bit or 64-bit
468 ;; elements.
469 (define_mode_iterator SVE_FULL_HSDI [VNx8HI VNx4SI VNx2DI])
471 ;; Fully-packed SVE integer vector modes that have 16-bit, 32-bit or 64-bit
472 ;; elements and Advanced SIMD Fully-packed 64-bit elements.
473 (define_mode_iterator SVE_FULL_HSDI_SIMD_DI [SVE_FULL_HSDI V2DI])
475 ;; Fully-packed SVE integer vector modes that have 16-bit or 32-bit
476 ;; elements.
477 (define_mode_iterator SVE_FULL_HSI [VNx8HI VNx4SI])
479 ;; Fully-packed SVE floating-point vector modes that have 16-bit or 32-bit
480 ;; elements.
481 (define_mode_iterator SVE_FULL_HSF [VNx8HF VNx4SF])
483 ;; Fully-packed SVE integer vector modes that have 16-bit or 64-bit elements.
484 (define_mode_iterator SVE_FULL_HDI [VNx8HI VNx2DI])
486 ;; Fully-packed SVE vector modes that have 32-bit or 64-bit elements.
487 (define_mode_iterator SVE_FULL_SD [VNx4SI VNx2DI VNx4SF VNx2DF])
489 ;; Fully-packed SVE integer vector modes that have 32-bit or 64-bit elements.
490 (define_mode_iterator SVE_FULL_SDI [VNx4SI VNx2DI])
492 ;; Fully-packed SVE and Advanced SIMD integer vector modes that have 32-bit or
493 ;; 64-bit elements.
494 (define_mode_iterator SVE_FULL_SDI_SIMD [SVE_FULL_SDI V4SI V2DI])
496 ;; 2x and 4x tuples of the above, excluding 2x DI.
497 (define_mode_iterator SVE_FULL_SIx2_SDIx4 [VNx8SI VNx16SI VNx8DI])
499 ;; Fully-packed SVE floating-point vector modes that have 32-bit or 64-bit
500 ;; elements.
501 (define_mode_iterator SVE_FULL_SDF [VNx4SF VNx2DF])
503 ;; Same, but with the appropriate conditions for FMMLA support.
504 (define_mode_iterator SVE_MATMULF [(VNx4SF "TARGET_SVE_F32MM")
505                                    (VNx2DF "TARGET_SVE_F64MM")])
507 ;; Fully-packed SVE vector modes that have 32-bit or smaller elements.
508 (define_mode_iterator SVE_FULL_BHS [VNx16QI VNx8HI VNx4SI
509                                     VNx8BF VNx8HF VNx4SF])
511 ;; Fully-packed SVE vector modes that have 32-bit elements.
512 (define_mode_iterator SVE_FULL_S [VNx4SI VNx4SF])
514 ;; Fully-packed SVE vector modes that have 64-bit elements.
515 (define_mode_iterator SVE_FULL_D [VNx2DI VNx2DF])
517 ;; All partial SVE integer modes.
518 (define_mode_iterator SVE_PARTIAL_I [VNx8QI VNx4QI VNx2QI
519                                      VNx4HI VNx2HI
520                                      VNx2SI])
522 ;; All SVE integer vector modes.
523 (define_mode_iterator SVE_I [VNx16QI VNx8QI VNx4QI VNx2QI
524                              VNx8HI VNx4HI VNx2HI
525                              VNx4SI VNx2SI
526                              VNx2DI])
528 ;; All SVE floating-point vector modes.
529 (define_mode_iterator SVE_F [VNx8HF VNx4HF VNx2HF
530                              VNx8BF VNx4BF VNx2BF
531                              VNx4SF VNx2SF
532                              VNx2DF])
534 ;; All SVE vector modes.
535 (define_mode_iterator SVE_ALL [SVE_I SVE_F])
537 ;; All SVE 2-vector modes.
538 (define_mode_iterator SVE_FULLx2 [VNx32QI VNx16HI VNx8SI VNx4DI
539                                   VNx16BF VNx16HF VNx8SF VNx4DF])
541 ;; All SVE 3-vector modes.
542 (define_mode_iterator SVE_FULLx3 [VNx48QI VNx24HI VNx12SI VNx6DI
543                                   VNx24BF VNx24HF VNx12SF VNx6DF])
545 ;; All SVE 4-vector modes.
546 (define_mode_iterator SVE_FULLx4 [VNx64QI VNx32HI VNx16SI VNx8DI
547                                   VNx32BF VNx32HF VNx16SF VNx8DF])
549 (define_mode_iterator SVE_FULLx24 [SVE_FULLx2 SVE_FULLx4])
551 ;; All SVE vector structure modes.
552 (define_mode_iterator SVE_STRUCT [SVE_FULLx2 SVE_FULLx3 SVE_FULLx4])
554 ;; All SVE vector and structure modes.
555 (define_mode_iterator SVE_ALL_STRUCT [SVE_ALL SVE_STRUCT])
557 ;; All SVE integer vector modes and Advanced SIMD 64-bit vector
558 ;; element modes
559 (define_mode_iterator SVE_I_SIMD_DI [SVE_I V2DI])
561 ;; All SVE and Advanced SIMD integer vector modes.
562 (define_mode_iterator SVE_VDQ_I [SVE_I VDQ_I])
564 ;; SVE integer vector modes whose elements are 16 bits or wider.
565 (define_mode_iterator SVE_HSDI [VNx8HI VNx4HI VNx2HI
566                                 VNx4SI VNx2SI
567                                 VNx2DI])
569 (define_mode_iterator SVE_DIx24 [VNx4DI VNx8DI])
571 ;; SVE modes with 2 or 4 elements.
572 (define_mode_iterator SVE_24 [VNx2QI VNx2HI VNx2HF VNx2BF VNx2SI VNx2SF
573                               VNx2DI VNx2DF
574                               VNx4QI VNx4HI VNx4HF VNx4BF VNx4SI VNx4SF])
576 ;; SVE integer modes with 2 or 4 elements.
577 (define_mode_iterator SVE_24I [VNx2QI VNx2HI VNx2SI VNx2DI
578                                VNx4QI VNx4HI VNx4SI])
580 ;; SVE modes with 2 elements.
581 (define_mode_iterator SVE_2 [VNx2QI VNx2HI VNx2HF VNx2BF
582                              VNx2SI VNx2SF VNx2DI VNx2DF])
584 ;; SVE integer modes with 2 elements, excluding the widest element.
585 (define_mode_iterator SVE_2BHSI [VNx2QI VNx2HI VNx2SI])
587 ;; SVE integer modes with 2 elements, excluding the narrowest element.
588 (define_mode_iterator SVE_2HSDI [VNx2HI VNx2SI VNx2DI])
590 ;; SVE modes with 4 elements.
591 (define_mode_iterator SVE_4 [VNx4QI VNx4HI VNx4HF VNx4BF VNx4SI VNx4SF])
593 ;; SVE integer modes with 4 elements, excluding the widest element.
594 (define_mode_iterator SVE_4BHI [VNx4QI VNx4HI])
596 ;; SVE integer modes with 4 elements, excluding the narrowest element.
597 (define_mode_iterator SVE_4HSI [VNx4HI VNx4SI])
599 ;; SVE integer modes that can form the input to an SVE2 PMULL[BT] instruction.
600 (define_mode_iterator SVE2_PMULL_PAIR_I [VNx16QI VNx4SI
601                                          (VNx2DI "TARGET_SVE2_AES")])
603 ;; Modes involved in extending or truncating SVE data, for 8 elements per
604 ;; 128-bit block.
605 (define_mode_iterator VNx8_NARROW [VNx8QI])
606 (define_mode_iterator VNx8_WIDE [VNx8HI])
608 ;; ...same for 4 elements per 128-bit block.
609 (define_mode_iterator VNx4_NARROW [VNx4QI VNx4HI])
610 (define_mode_iterator VNx4_WIDE [VNx4SI])
612 ;; ...same for 2 elements per 128-bit block.
613 (define_mode_iterator VNx2_NARROW [VNx2QI VNx2HI VNx2SI])
614 (define_mode_iterator VNx2_WIDE [VNx2DI])
616 ;; All SVE predicate modes.
617 (define_mode_iterator PRED_ALL [VNx16BI VNx8BI VNx4BI VNx2BI])
619 ;; SVE predicate modes that control 8-bit, 16-bit or 32-bit elements.
620 (define_mode_iterator PRED_BHS [VNx16BI VNx8BI VNx4BI])
622 ;; SVE predicate modes that control 16-bit, 32-bit or 64-bit elements.
623 (define_mode_iterator PRED_HSD [VNx8BI VNx4BI VNx2BI])
625 ;; Bfloat16 modes to which V4SF can be converted
626 (define_mode_iterator V4SF_TO_BF [V4BF V8BF])
628 (define_mode_iterator SVE_BHSx24 [VNx32QI VNx16HI VNx8SI
629                                   VNx16BF VNx16HF VNx8SF
630                                   VNx64QI VNx32HI VNx16SI
631                                   VNx32BF VNx32HF VNx16SF])
633 (define_mode_iterator SVE_Ix24 [VNx32QI VNx16HI VNx8SI VNx4DI
634                                 VNx64QI VNx32HI VNx16SI VNx8DI])
636 (define_mode_iterator SVE_Fx24 [VNx16HF VNx8SF VNx4DF
637                                 VNx32HF VNx16SF VNx8DF])
639 (define_mode_iterator SVE_SFx24 [VNx8SF VNx16SF])
641 ;; The modes used to represent different ZA access sizes.
642 (define_mode_iterator SME_ZA_I [VNx16QI VNx8HI VNx4SI VNx2DI VNx1TI])
643 (define_mode_iterator SME_ZA_SDI [VNx4SI (VNx2DI "TARGET_SME_I16I64")])
645 (define_mode_iterator SME_ZA_SDF_I [VNx4SI (VNx2DI "TARGET_SME_F64F64")])
647 (define_mode_iterator SME_ZA_BIx24 [VNx32QI VNx64QI])
649 (define_mode_iterator SME_ZA_BHIx124 [VNx16QI VNx32QI VNx64QI
650                                       VNx8HI VNx16HI VNx32HI])
652 (define_mode_iterator SME_ZA_BHIx24 [VNx32QI VNx64QI VNx16HI VNx32HI])
654 (define_mode_iterator SME_ZA_HFx124 [VNx8BF VNx16BF VNx32BF
655                                      VNx8HF VNx16HF VNx32HF])
657 (define_mode_iterator SME_ZA_HFx24 [VNx16BF VNx32BF VNx16HF VNx32HF])
659 (define_mode_iterator SME_ZA_HIx124 [VNx8HI VNx16HI VNx32HI])
661 (define_mode_iterator SME_ZA_HIx24 [VNx16HI VNx32HI])
663 (define_mode_iterator SME_ZA_SDIx24 [VNx8SI (VNx4DI "TARGET_SME_I16I64")
664                                      VNx16SI (VNx8DI "TARGET_SME_I16I64")])
666 (define_mode_iterator SME_ZA_SDFx24 [VNx8SF (VNx4DF "TARGET_SME_F64F64")
667                                      VNx16SF (VNx8DF "TARGET_SME_F64F64")])
669 ;; The modes for which outer product instructions are supported.
670 (define_mode_iterator SME_MOP_BHI [VNx16QI (VNx8HI "TARGET_SME_I16I64")])
671 (define_mode_iterator SME_MOP_HSDF [VNx8BF VNx8HF VNx4SF
672                                     (VNx2DF "TARGET_SME_F64F64")])
674 ;; ------------------------------------------------------------------
675 ;; Unspec enumerations for Advance SIMD. These could well go into
676 ;; aarch64.md but for their use in int_iterators here.
677 ;; ------------------------------------------------------------------
679 (define_c_enum "unspec"
681     UNSPEC_ASHIFT_SIGNED        ; Used in aarch-simd.md.
682     UNSPEC_ASHIFT_UNSIGNED      ; Used in aarch64-simd.md.
683     UNSPEC_ABS          ; Used in aarch64-simd.md.
684     UNSPEC_FMAX         ; Used in aarch64-simd.md.
685     UNSPEC_FMAXNMV      ; Used in aarch64-simd.md.
686     UNSPEC_FMAXV        ; Used in aarch64-simd.md.
687     UNSPEC_FMIN         ; Used in aarch64-simd.md.
688     UNSPEC_FMINNMV      ; Used in aarch64-simd.md.
689     UNSPEC_FMINV        ; Used in aarch64-simd.md.
690     UNSPEC_FADDV        ; Used in aarch64-simd.md.
691     UNSPEC_FNEG         ; Used in aarch64-simd.md.
692     UNSPEC_ADDV         ; Used in aarch64-simd.md.
693     UNSPEC_SMAXV        ; Used in aarch64-simd.md.
694     UNSPEC_SMINV        ; Used in aarch64-simd.md.
695     UNSPEC_UMAXV        ; Used in aarch64-simd.md.
696     UNSPEC_UMINV        ; Used in aarch64-simd.md.
697     UNSPEC_SHADD        ; Used in aarch64-simd.md.
698     UNSPEC_UHADD        ; Used in aarch64-simd.md.
699     UNSPEC_SRHADD       ; Used in aarch64-simd.md.
700     UNSPEC_URHADD       ; Used in aarch64-simd.md.
701     UNSPEC_SHSUB        ; Used in aarch64-simd.md.
702     UNSPEC_UHSUB        ; Used in aarch64-simd.md.
703     UNSPEC_SQDMULH      ; Used in aarch64-simd.md.
704     UNSPEC_SQRDMULH     ; Used in aarch64-simd.md.
705     UNSPEC_PMUL         ; Used in aarch64-simd.md.
706     UNSPEC_FMULX        ; Used in aarch64-simd.md.
707     UNSPEC_USQADD       ; Used in aarch64-simd.md.
708     UNSPEC_SUQADD       ; Used in aarch64-simd.md.
709     UNSPEC_SSRA         ; Used in aarch64-simd.md.
710     UNSPEC_USRA         ; Used in aarch64-simd.md.
711     UNSPEC_SRSHR        ; Used in aarch64-simd.md.
712     UNSPEC_URSHR        ; Used in aarch64-simd.md.
713     UNSPEC_SQSHLU       ; Used in aarch64-simd.md.
714     UNSPEC_SQSHL        ; Used in aarch64-simd.md.
715     UNSPEC_UQSHL        ; Used in aarch64-simd.md.
716     UNSPEC_SSHL         ; Used in aarch64-simd.md.
717     UNSPEC_USHL         ; Used in aarch64-simd.md.
718     UNSPEC_SRSHL        ; Used in aarch64-simd.md.
719     UNSPEC_URSHL        ; Used in aarch64-simd.md.
720     UNSPEC_SQRSHL       ; Used in aarch64-simd.md.
721     UNSPEC_UQRSHL       ; Used in aarch64-simd.md.
722     UNSPEC_SSLI         ; Used in aarch64-simd.md.
723     UNSPEC_USLI         ; Used in aarch64-simd.md.
724     UNSPEC_SSRI         ; Used in aarch64-simd.md.
725     UNSPEC_USRI         ; Used in aarch64-simd.md.
726     UNSPEC_SSHLL        ; Used in aarch64-simd.md.
727     UNSPEC_USHLL        ; Used in aarch64-simd.md.
728     UNSPEC_ADDP         ; Used in aarch64-simd.md.
729     UNSPEC_TBL          ; Used in vector permute patterns.
730     UNSPEC_TBX          ; Used in vector permute patterns.
731     UNSPEC_CONCAT       ; Used in vector permute patterns.
733     ;; The following permute unspecs are generated directly by
734     ;; aarch64_expand_vec_perm_const, so any changes to the underlying
735     ;; instructions would need a corresponding change there.
736     UNSPEC_ZIP1         ; Used in vector permute patterns.
737     UNSPEC_ZIP2         ; Used in vector permute patterns.
738     UNSPEC_UZP1         ; Used in vector permute patterns.
739     UNSPEC_UZP2         ; Used in vector permute patterns.
740     UNSPEC_TRN1         ; Used in vector permute patterns.
741     UNSPEC_TRN2         ; Used in vector permute patterns.
742     UNSPEC_EXT          ; Used in vector permute patterns.
743     UNSPEC_REV64        ; Used in vector reverse patterns (permute).
744     UNSPEC_REV32        ; Used in vector reverse patterns (permute).
745     UNSPEC_REV16        ; Used in vector reverse patterns (permute).
747     UNSPEC_AESE         ; Used in aarch64-simd.md.
748     UNSPEC_AESD         ; Used in aarch64-simd.md.
749     UNSPEC_AESMC        ; Used in aarch64-simd.md.
750     UNSPEC_AESIMC       ; Used in aarch64-simd.md.
751     UNSPEC_SHA1C        ; Used in aarch64-simd.md.
752     UNSPEC_SHA1M        ; Used in aarch64-simd.md.
753     UNSPEC_SHA1P        ; Used in aarch64-simd.md.
754     UNSPEC_SHA1H        ; Used in aarch64-simd.md.
755     UNSPEC_SHA1SU0      ; Used in aarch64-simd.md.
756     UNSPEC_SHA1SU1      ; Used in aarch64-simd.md.
757     UNSPEC_SHA256H      ; Used in aarch64-simd.md.
758     UNSPEC_SHA256H2     ; Used in aarch64-simd.md.
759     UNSPEC_SHA256SU0    ; Used in aarch64-simd.md.
760     UNSPEC_SHA256SU1    ; Used in aarch64-simd.md.
761     UNSPEC_PMULL        ; Used in aarch64-simd.md.
762     UNSPEC_PMULL2       ; Used in aarch64-simd.md.
763     UNSPEC_REV_REGLIST  ; Used in aarch64-simd.md.
764     UNSPEC_VEC_SHR      ; Used in aarch64-simd.md.
765     UNSPEC_SQRDMLAH     ; Used in aarch64-simd.md.
766     UNSPEC_SQRDMLSH     ; Used in aarch64-simd.md.
767     UNSPEC_FMAXNM       ; Used in aarch64-simd.md.
768     UNSPEC_FMINNM       ; Used in aarch64-simd.md.
769     UNSPEC_SDOT         ; Used in aarch64-simd.md.
770     UNSPEC_UDOT         ; Used in aarch64-simd.md.
771     UNSPEC_SM3SS1       ; Used in aarch64-simd.md.
772     UNSPEC_SM3TT1A      ; Used in aarch64-simd.md.
773     UNSPEC_SM3TT1B      ; Used in aarch64-simd.md.
774     UNSPEC_SM3TT2A      ; Used in aarch64-simd.md.
775     UNSPEC_SM3TT2B      ; Used in aarch64-simd.md.
776     UNSPEC_SM3PARTW1    ; Used in aarch64-simd.md.
777     UNSPEC_SM3PARTW2    ; Used in aarch64-simd.md.
778     UNSPEC_SM4E         ; Used in aarch64-simd.md.
779     UNSPEC_SM4EKEY      ; Used in aarch64-simd.md.
780     UNSPEC_SHA512H      ; Used in aarch64-simd.md.
781     UNSPEC_SHA512H2     ; Used in aarch64-simd.md.
782     UNSPEC_SHA512SU0    ; Used in aarch64-simd.md.
783     UNSPEC_SHA512SU1    ; Used in aarch64-simd.md.
784     UNSPEC_FMLAL        ; Used in aarch64-simd.md.
785     UNSPEC_FMLSL        ; Used in aarch64-simd.md.
786     UNSPEC_FMLAL2       ; Used in aarch64-simd.md.
787     UNSPEC_FMLSL2       ; Used in aarch64-simd.md.
788     UNSPEC_ADR          ; Used in aarch64-sve.md.
789     UNSPEC_SEL          ; Used in aarch64-sve.md.
790     UNSPEC_BRKA         ; Used in aarch64-sve.md.
791     UNSPEC_BRKB         ; Used in aarch64-sve.md.
792     UNSPEC_BRKN         ; Used in aarch64-sve.md.
793     UNSPEC_BRKPA        ; Used in aarch64-sve.md.
794     UNSPEC_BRKPB        ; Used in aarch64-sve.md.
795     UNSPEC_PFIRST       ; Used in aarch64-sve.md.
796     UNSPEC_PNEXT        ; Used in aarch64-sve.md.
797     UNSPEC_CNTP         ; Used in aarch64-sve.md.
798     UNSPEC_SADDV        ; Used in aarch64-sve.md.
799     UNSPEC_UADDV        ; Used in aarch64-sve.md.
800     UNSPEC_ANDV         ; Used in aarch64-sve.md.
801     UNSPEC_IORV         ; Used in aarch64-sve.md.
802     UNSPEC_XORV         ; Used in aarch64-sve.md.
803     UNSPEC_ANDF         ; Used in aarch64-sve.md.
804     UNSPEC_IORF         ; Used in aarch64-sve.md.
805     UNSPEC_XORF         ; Used in aarch64-sve.md.
806     UNSPEC_REVB         ; Used in aarch64-sve.md.
807     UNSPEC_REVD         ; Used in aarch64-sve2.md.
808     UNSPEC_REVH         ; Used in aarch64-sve.md.
809     UNSPEC_REVW         ; Used in aarch64-sve.md.
810     UNSPEC_REVBHW       ; Used in aarch64-sve.md.
811     UNSPEC_SMUL_HIGHPART ; Used in aarch64-sve.md.
812     UNSPEC_UMUL_HIGHPART ; Used in aarch64-sve.md.
813     UNSPEC_FMLA         ; Used in aarch64-sve.md.
814     UNSPEC_FMLS         ; Used in aarch64-sve.md.
815     UNSPEC_FEXPA        ; Used in aarch64-sve.md.
816     UNSPEC_FMMLA        ; Used in aarch64-sve.md.
817     UNSPEC_FTMAD        ; Used in aarch64-sve.md.
818     UNSPEC_FTSMUL       ; Used in aarch64-sve.md.
819     UNSPEC_FTSSEL       ; Used in aarch64-sve.md.
820     UNSPEC_SMATMUL      ; Used in aarch64-sve.md.
821     UNSPEC_SET_NEONQ    ; Used in aarch64-sve.md.
822     UNSPEC_UMATMUL      ; Used in aarch64-sve.md.
823     UNSPEC_USMATMUL     ; Used in aarch64-sve.md.
824     UNSPEC_TRN1Q        ; Used in aarch64-sve.md.
825     UNSPEC_TRN2Q        ; Used in aarch64-sve.md.
826     UNSPEC_UZP1Q        ; Used in aarch64-sve.md.
827     UNSPEC_UZP2Q        ; Used in aarch64-sve.md.
828     UNSPEC_ZIP1Q        ; Used in aarch64-sve.md.
829     UNSPEC_ZIP2Q        ; Used in aarch64-sve.md.
830     UNSPEC_TRN1_CONV    ; Used in aarch64-sve.md.
831     UNSPEC_COND_CMPEQ_WIDE ; Used in aarch64-sve.md.
832     UNSPEC_COND_CMPGE_WIDE ; Used in aarch64-sve.md.
833     UNSPEC_COND_CMPGT_WIDE ; Used in aarch64-sve.md.
834     UNSPEC_COND_CMPHI_WIDE ; Used in aarch64-sve.md.
835     UNSPEC_COND_CMPHS_WIDE ; Used in aarch64-sve.md.
836     UNSPEC_COND_CMPLE_WIDE ; Used in aarch64-sve.md.
837     UNSPEC_COND_CMPLO_WIDE ; Used in aarch64-sve.md.
838     UNSPEC_COND_CMPLS_WIDE ; Used in aarch64-sve.md.
839     UNSPEC_COND_CMPLT_WIDE ; Used in aarch64-sve.md.
840     UNSPEC_COND_CMPNE_WIDE ; Used in aarch64-sve.md.
841     UNSPEC_COND_FABS    ; Used in aarch64-sve.md.
842     UNSPEC_COND_FADD    ; Used in aarch64-sve.md.
843     UNSPEC_COND_FAMAX   ; Used in aarch64-sve.md.
844     UNSPEC_COND_FAMIN   ; Used in aarch64-sve.md.
845     UNSPEC_COND_FCADD90 ; Used in aarch64-sve.md.
846     UNSPEC_COND_FCADD270 ; Used in aarch64-sve.md.
847     UNSPEC_COND_FCMEQ   ; Used in aarch64-sve.md.
848     UNSPEC_COND_FCMGE   ; Used in aarch64-sve.md.
849     UNSPEC_COND_FCMGT   ; Used in aarch64-sve.md.
850     UNSPEC_COND_FCMLA   ; Used in aarch64-sve.md.
851     UNSPEC_COND_FCMLA90 ; Used in aarch64-sve.md.
852     UNSPEC_COND_FCMLA180 ; Used in aarch64-sve.md.
853     UNSPEC_COND_FCMLA270 ; Used in aarch64-sve.md.
854     UNSPEC_COND_FCMLE   ; Used in aarch64-sve.md.
855     UNSPEC_COND_FCMLT   ; Used in aarch64-sve.md.
856     UNSPEC_COND_FCMNE   ; Used in aarch64-sve.md.
857     UNSPEC_COND_FCMUO   ; Used in aarch64-sve.md.
858     UNSPEC_COND_FCVT    ; Used in aarch64-sve.md.
859     UNSPEC_COND_FCVTZS  ; Used in aarch64-sve.md.
860     UNSPEC_COND_FCVTZU  ; Used in aarch64-sve.md.
861     UNSPEC_COND_FDIV    ; Used in aarch64-sve.md.
862     UNSPEC_COND_FMAX    ; Used in aarch64-sve.md.
863     UNSPEC_COND_FMAXNM  ; Used in aarch64-sve.md.
864     UNSPEC_COND_FMIN    ; Used in aarch64-sve.md.
865     UNSPEC_COND_FMINNM  ; Used in aarch64-sve.md.
866     UNSPEC_COND_FMLA    ; Used in aarch64-sve.md.
867     UNSPEC_COND_FMLS    ; Used in aarch64-sve.md.
868     UNSPEC_COND_FMUL    ; Used in aarch64-sve.md.
869     UNSPEC_COND_FMULX   ; Used in aarch64-sve.md.
870     UNSPEC_COND_FNEG    ; Used in aarch64-sve.md.
871     UNSPEC_COND_FNMLA   ; Used in aarch64-sve.md.
872     UNSPEC_COND_FNMLS   ; Used in aarch64-sve.md.
873     UNSPEC_COND_FRECPX  ; Used in aarch64-sve.md.
874     UNSPEC_COND_FRINTA  ; Used in aarch64-sve.md.
875     UNSPEC_COND_FRINTI  ; Used in aarch64-sve.md.
876     UNSPEC_COND_FRINTM  ; Used in aarch64-sve.md.
877     UNSPEC_COND_FRINTN  ; Used in aarch64-sve.md.
878     UNSPEC_COND_FRINTP  ; Used in aarch64-sve.md.
879     UNSPEC_COND_FRINTX  ; Used in aarch64-sve.md.
880     UNSPEC_COND_FRINTZ  ; Used in aarch64-sve.md.
881     UNSPEC_COND_FSCALE  ; Used in aarch64-sve.md.
882     UNSPEC_COND_FSQRT   ; Used in aarch64-sve.md.
883     UNSPEC_COND_FSUB    ; Used in aarch64-sve.md.
884     UNSPEC_COND_SCVTF   ; Used in aarch64-sve.md.
885     UNSPEC_COND_SMAX    ; Used in aarch64-sve.md.
886     UNSPEC_COND_SMIN    ; Used in aarch64-sve.md.
887     UNSPEC_COND_UCVTF   ; Used in aarch64-sve.md.
888     UNSPEC_LASTA        ; Used in aarch64-sve.md.
889     UNSPEC_LASTB        ; Used in aarch64-sve.md.
890     UNSPEC_ASHIFT_WIDE  ; Used in aarch64-sve.md.
891     UNSPEC_ASHIFTRT_WIDE ; Used in aarch64-sve.md.
892     UNSPEC_LSHIFTRT_WIDE ; Used in aarch64-sve.md.
893     UNSPEC_LDFF1        ; Used in aarch64-sve.md.
894     UNSPEC_LDNF1        ; Used in aarch64-sve.md.
895     UNSPEC_FCADD90      ; Used in aarch64-simd.md.
896     UNSPEC_FCADD270     ; Used in aarch64-simd.md.
897     UNSPEC_FCMLA        ; Used in aarch64-simd.md.
898     UNSPEC_FCMLA90      ; Used in aarch64-simd.md.
899     UNSPEC_FCMLA180     ; Used in aarch64-simd.md.
900     UNSPEC_FCMLA270     ; Used in aarch64-simd.md.
901     UNSPEC_FCMUL        ; Used in aarch64-simd.md.
902     UNSPEC_FCMUL_CONJ   ; Used in aarch64-simd.md.
903     UNSPEC_FCMLA_CONJ   ; Used in aarch64-simd.md.
904     UNSPEC_FCMLA180_CONJ        ; Used in aarch64-simd.md.
905     UNSPEC_ASRD         ; Used in aarch64-sve.md.
906     UNSPEC_ADCLB        ; Used in aarch64-sve2.md.
907     UNSPEC_ADCLT        ; Used in aarch64-sve2.md.
908     UNSPEC_ADDHNB       ; Used in aarch64-sve2.md.
909     UNSPEC_ADDHNT       ; Used in aarch64-sve2.md.
910     UNSPEC_BDEP         ; Used in aarch64-sve2.md.
911     UNSPEC_BEXT         ; Used in aarch64-sve2.md.
912     UNSPEC_BGRP         ; Used in aarch64-sve2.md.
913     UNSPEC_CADD270      ; Used in aarch64-sve2.md.
914     UNSPEC_CADD90       ; Used in aarch64-sve2.md.
915     UNSPEC_CDOT         ; Used in aarch64-sve2.md.
916     UNSPEC_CDOT180      ; Used in aarch64-sve2.md.
917     UNSPEC_CDOT270      ; Used in aarch64-sve2.md.
918     UNSPEC_CDOT90       ; Used in aarch64-sve2.md.
919     UNSPEC_CMLA         ; Used in aarch64-sve2.md.
920     UNSPEC_CMLA180      ; Used in aarch64-sve2.md.
921     UNSPEC_CMLA270      ; Used in aarch64-sve2.md.
922     UNSPEC_CMLA90       ; Used in aarch64-sve2.md.
923     UNSPEC_CMLA_CONJ    ; Used in aarch64-sve2.md.
924     UNSPEC_CMLA180_CONJ ; Used in aarch64-sve2.md.
925     UNSPEC_CMUL         ; Used in aarch64-sve2.md.
926     UNSPEC_CMUL_CONJ    ; Used in aarch64-sve2.md.
927     UNSPEC_CNTP_C       ; Used in aarch64-sve2.md.
928     UNSPEC_COND_FCVTLT  ; Used in aarch64-sve2.md.
929     UNSPEC_COND_FCVTNT  ; Used in aarch64-sve2.md.
930     UNSPEC_COND_FCVTX   ; Used in aarch64-sve2.md.
931     UNSPEC_COND_FCVTXNT ; Used in aarch64-sve2.md.
932     UNSPEC_COND_FLOGB   ; Used in aarch64-sve2.md.
933     UNSPEC_EORBT        ; Used in aarch64-sve2.md.
934     UNSPEC_EORTB        ; Used in aarch64-sve2.md.
935     UNSPEC_FADDP        ; Used in aarch64-sve2.md.
936     UNSPEC_FMAXNMP      ; Used in aarch64-sve2.md.
937     UNSPEC_FMAXP        ; Used in aarch64-sve2.md.
938     UNSPEC_FMINNMP      ; Used in aarch64-sve2.md.
939     UNSPEC_FMINP        ; Used in aarch64-sve2.md.
940     UNSPEC_FMLALB       ; Used in aarch64-sve2.md.
941     UNSPEC_FMLALT       ; Used in aarch64-sve2.md.
942     UNSPEC_FMLSLB       ; Used in aarch64-sve2.md.
943     UNSPEC_FMLSLT       ; Used in aarch64-sve2.md.
944     UNSPEC_HISTCNT      ; Used in aarch64-sve2.md.
945     UNSPEC_HISTSEG      ; Used in aarch64-sve2.md.
946     UNSPEC_LD1_COUNT    ; Used in aarch64-sve2.md.
947     UNSPEC_LDNT1_COUNT  ; Used in aarch64-sve2.md.
948     UNSPEC_MATCH        ; Used in aarch64-sve2.md.
949     UNSPEC_NMATCH       ; Used in aarch64-sve2.md.
950     UNSPEC_PEXT         ; Used in aarch64-sve2.md.
951     UNSPEC_PEXTx2       ; Used in aarch64-sve2.md.
952     UNSPEC_PMULLB       ; Used in aarch64-sve2.md.
953     UNSPEC_PMULLB_PAIR  ; Used in aarch64-sve2.md.
954     UNSPEC_PMULLT       ; Used in aarch64-sve2.md.
955     UNSPEC_PMULLT_PAIR  ; Used in aarch64-sve2.md.
956     UNSPEC_PSEL         ; Used in aarch64-sve2.md.
957     UNSPEC_PTRUE_C      ; Used in aarch64-sve2.md.
958     UNSPEC_RADDHNB      ; Used in aarch64-sve2.md.
959     UNSPEC_RADDHNT      ; Used in aarch64-sve2.md.
960     UNSPEC_RSHRNB       ; Used in aarch64-sve2.md.
961     UNSPEC_RSHRNT       ; Used in aarch64-sve2.md.
962     UNSPEC_RSUBHNB      ; Used in aarch64-sve2.md.
963     UNSPEC_RSUBHNT      ; Used in aarch64-sve2.md.
964     UNSPEC_SABDLB       ; Used in aarch64-sve2.md.
965     UNSPEC_SABDLT       ; Used in aarch64-sve2.md.
966     UNSPEC_SADDLB       ; Used in aarch64-sve2.md.
967     UNSPEC_SADDLBT      ; Used in aarch64-sve2.md.
968     UNSPEC_SADDLT       ; Used in aarch64-sve2.md.
969     UNSPEC_SADDWB       ; Used in aarch64-sve2.md.
970     UNSPEC_SADDWT       ; Used in aarch64-sve2.md.
971     UNSPEC_SBCLB        ; Used in aarch64-sve2.md.
972     UNSPEC_SBCLT        ; Used in aarch64-sve2.md.
973     UNSPEC_SHRNB        ; Used in aarch64-sve2.md.
974     UNSPEC_SHRNT        ; Used in aarch64-sve2.md.
975     UNSPEC_SLI          ; Used in aarch64-sve2.md.
976     UNSPEC_SMAXP        ; Used in aarch64-sve2.md.
977     UNSPEC_SMINP        ; Used in aarch64-sve2.md.
978     UNSPEC_SMULHRS      ; Used in aarch64-sve2.md.
979     UNSPEC_SMULHS       ; Used in aarch64-sve2.md.
980     UNSPEC_SMULLB       ; Used in aarch64-sve2.md.
981     UNSPEC_SMULLT       ; Used in aarch64-sve2.md.
982     UNSPEC_SQCADD270    ; Used in aarch64-sve2.md.
983     UNSPEC_SQCADD90     ; Used in aarch64-sve2.md.
984     UNSPEC_SQDMULLB     ; Used in aarch64-sve2.md.
985     UNSPEC_SQDMULLBT    ; Used in aarch64-sve2.md.
986     UNSPEC_SQDMULLT     ; Used in aarch64-sve2.md.
987     UNSPEC_SQRDCMLAH    ; Used in aarch64-sve2.md.
988     UNSPEC_SQRDCMLAH180 ; Used in aarch64-sve2.md.
989     UNSPEC_SQRDCMLAH270 ; Used in aarch64-sve2.md.
990     UNSPEC_SQRDCMLAH90  ; Used in aarch64-sve2.md.
991     UNSPEC_SQRSHR       ; Used in aarch64-sve2.md.
992     UNSPEC_SQRSHRN      ; Used in aarch64-sve2.md.
993     UNSPEC_SQRSHRNB     ; Used in aarch64-sve2.md.
994     UNSPEC_SQRSHRNT     ; Used in aarch64-sve2.md.
995     UNSPEC_SQRSHRU      ; Used in aarch64-sve2.md.
996     UNSPEC_SQRSHRUN     ; Used in aarch64-sve2.md.
997     UNSPEC_SQRSHRUNB    ; Used in aarch64-sve2.md.
998     UNSPEC_SQRSHRUNT    ; Used in aarch64-sve2.md.
999     UNSPEC_SQSHRNB      ; Used in aarch64-sve2.md.
1000     UNSPEC_SQSHRNT      ; Used in aarch64-sve2.md.
1001     UNSPEC_SQSHRUNB     ; Used in aarch64-sve2.md.
1002     UNSPEC_SQSHRUNT     ; Used in aarch64-sve2.md.
1003     UNSPEC_SQXTNB       ; Used in aarch64-sve2.md.
1004     UNSPEC_SQXTNT       ; Used in aarch64-sve2.md.
1005     UNSPEC_SQXTUNB      ; Used in aarch64-sve2.md.
1006     UNSPEC_SQXTUNT      ; Used in aarch64-sve2.md.
1007     UNSPEC_SRI          ; Used in aarch64-sve2.md.
1008     UNSPEC_SSHLLB       ; Used in aarch64-sve2.md.
1009     UNSPEC_SSHLLT       ; Used in aarch64-sve2.md.
1010     UNSPEC_SSUBLB       ; Used in aarch64-sve2.md.
1011     UNSPEC_SSUBLBT      ; Used in aarch64-sve2.md.
1012     UNSPEC_SSUBLT       ; Used in aarch64-sve2.md.
1013     UNSPEC_SSUBLTB      ; Used in aarch64-sve2.md.
1014     UNSPEC_SSUBWB       ; Used in aarch64-sve2.md.
1015     UNSPEC_SSUBWT       ; Used in aarch64-sve2.md.
1016     UNSPEC_ST1_COUNT    ; Used in aarch64-sve2.md.
1017     UNSPEC_STNT1_COUNT  ; Used in aarch64-sve2.md.
1018     UNSPEC_SUBHNB       ; Used in aarch64-sve2.md.
1019     UNSPEC_SUBHNT       ; Used in aarch64-sve2.md.
1020     UNSPEC_TBL2         ; Used in aarch64-sve2.md.
1021     UNSPEC_UABDLB       ; Used in aarch64-sve2.md.
1022     UNSPEC_UABDLT       ; Used in aarch64-sve2.md.
1023     UNSPEC_UADDLB       ; Used in aarch64-sve2.md.
1024     UNSPEC_UADDLT       ; Used in aarch64-sve2.md.
1025     UNSPEC_UADDWB       ; Used in aarch64-sve2.md.
1026     UNSPEC_UADDWT       ; Used in aarch64-sve2.md.
1027     UNSPEC_UMAXP        ; Used in aarch64-sve2.md.
1028     UNSPEC_UMINP        ; Used in aarch64-sve2.md.
1029     UNSPEC_UMULHRS      ; Used in aarch64-sve2.md.
1030     UNSPEC_UMULHS       ; Used in aarch64-sve2.md.
1031     UNSPEC_UMULLB       ; Used in aarch64-sve2.md.
1032     UNSPEC_UMULLT       ; Used in aarch64-sve2.md.
1033     UNSPEC_UQRSHR       ; Used in aarch64-sve2.md.
1034     UNSPEC_UQRSHRN      ; Used in aarch64-sve2.md.
1035     UNSPEC_UQRSHRNB     ; Used in aarch64-sve2.md.
1036     UNSPEC_UQRSHRNT     ; Used in aarch64-sve2.md.
1037     UNSPEC_UQSHRNB      ; Used in aarch64-sve2.md.
1038     UNSPEC_UQSHRNT      ; Used in aarch64-sve2.md.
1039     UNSPEC_UQXTNB       ; Used in aarch64-sve2.md.
1040     UNSPEC_UQXTNT       ; Used in aarch64-sve2.md.
1041     UNSPEC_USHLLB       ; Used in aarch64-sve2.md.
1042     UNSPEC_USHLLT       ; Used in aarch64-sve2.md.
1043     UNSPEC_USUBLB       ; Used in aarch64-sve2.md.
1044     UNSPEC_USUBLT       ; Used in aarch64-sve2.md.
1045     UNSPEC_USUBWB       ; Used in aarch64-sve2.md.
1046     UNSPEC_USUBWT       ; Used in aarch64-sve2.md.
1047     UNSPEC_USDOT        ; Used in aarch64-simd.md.
1048     UNSPEC_UZP          ; Used in aarch64-sve2.md.
1049     UNSPEC_UZPQ         ; Used in aarch64-sve2.md.
1050     UNSPEC_ZIP          ; Used in aarch64-sve2.md.
1051     UNSPEC_ZIPQ         ; Used in aarch64-sve2.md.
1052     UNSPEC_SUDOT        ; Used in aarch64-simd.md.
1053     UNSPEC_BFDOT        ; Used in aarch64-simd.md.
1054     UNSPEC_BFMLALB      ; Used in aarch64-sve.md.
1055     UNSPEC_BFMLALT      ; Used in aarch64-sve.md.
1056     UNSPEC_BFMLSLB      ; Used in aarch64-sve.md.
1057     UNSPEC_BFMLSLT      ; Used in aarch64-sve.md.
1058     UNSPEC_BFMMLA       ; Used in aarch64-sve.md.
1059     UNSPEC_BFCVTN      ; Used in aarch64-simd.md.
1060     UNSPEC_BFCVTN2     ; Used in aarch64-simd.md.
1061     UNSPEC_BFCVT       ; Used in aarch64-simd.md.
1062     UNSPEC_FCVTXN       ; Used in aarch64-simd.md.
1063     UNSPEC_FAMAX       ; Used in aarch64-simd.md.
1064     UNSPEC_FAMIN       ; Used in aarch64-simd.md.
1066     ;; All used in aarch64-sve2.md
1067     UNSPEC_FCVTN
1068     UNSPEC_FDOT
1069     UNSPEC_SQCVT
1070     UNSPEC_SQCVTN
1071     UNSPEC_SQCVTU
1072     UNSPEC_SQCVTUN
1073     UNSPEC_UQCVT
1074     UNSPEC_UQCVTN
1076     ;; All used in aarch64-sme.md
1077     UNSPEC_SME_ADD
1078     UNSPEC_SME_ADD_WRITE
1079     UNSPEC_SME_ADDHA
1080     UNSPEC_SME_ADDVA
1081     UNSPEC_SME_BMOPA
1082     UNSPEC_SME_BMOPS
1083     UNSPEC_SME_FADD
1084     UNSPEC_SME_FDOT
1085     UNSPEC_SME_FVDOT
1086     UNSPEC_SME_FMLA
1087     UNSPEC_SME_FMLS
1088     UNSPEC_SME_FMOPA
1089     UNSPEC_SME_FMOPS
1090     UNSPEC_SME_FSUB
1091     UNSPEC_SME_LD1_HOR
1092     UNSPEC_SME_LD1_VER
1093     UNSPEC_SME_READ
1094     UNSPEC_SME_READ_HOR
1095     UNSPEC_SME_READ_VER
1096     UNSPEC_SME_SDOT
1097     UNSPEC_SME_SVDOT
1098     UNSPEC_SME_SMLA
1099     UNSPEC_SME_SMLS
1100     UNSPEC_SME_SMOPA
1101     UNSPEC_SME_SMOPS
1102     UNSPEC_SME_ST1_HOR
1103     UNSPEC_SME_ST1_VER
1104     UNSPEC_SME_SUB
1105     UNSPEC_SME_SUB_WRITE
1106     UNSPEC_SME_SUDOT
1107     UNSPEC_SME_SUVDOT
1108     UNSPEC_SME_SUMOPA
1109     UNSPEC_SME_SUMOPS
1110     UNSPEC_SME_UDOT
1111     UNSPEC_SME_UVDOT
1112     UNSPEC_SME_UMLA
1113     UNSPEC_SME_UMLS
1114     UNSPEC_SME_UMOPA
1115     UNSPEC_SME_UMOPS
1116     UNSPEC_SME_USDOT
1117     UNSPEC_SME_USVDOT
1118     UNSPEC_SME_USMOPA
1119     UNSPEC_SME_USMOPS
1120     UNSPEC_SME_WRITE
1121     UNSPEC_SME_WRITE_HOR
1122     UNSPEC_SME_WRITE_VER
1125 ;; ------------------------------------------------------------------
1126 ;; Unspec enumerations for Atomics.  They are here so that they can be
1127 ;; used in the int_iterators for atomic operations.
1128 ;; ------------------------------------------------------------------
1130 (define_c_enum "unspecv"
1132     UNSPECV_LX                  ; Represent a load-exclusive.
1133     UNSPECV_SX                  ; Represent a store-exclusive.
1134     UNSPECV_LDA                 ; Represent an atomic load or load-acquire.
1135     UNSPECV_LDAP                ; Represent an atomic acquire load with RCpc semantics.
1136     UNSPECV_STL                 ; Represent an atomic store or store-release.
1137     UNSPECV_ATOMIC_CMPSW        ; Represent an atomic compare swap.
1138     UNSPECV_ATOMIC_EXCHG        ; Represent an atomic exchange.
1139     UNSPECV_ATOMIC_CAS          ; Represent an atomic CAS.
1140     UNSPECV_ATOMIC_SWP          ; Represent an atomic SWP.
1141     UNSPECV_ATOMIC_OP           ; Represent an atomic operation.
1142     UNSPECV_ATOMIC_LDOP_OR      ; Represent an atomic load-or
1143     UNSPECV_ATOMIC_LDOP_BIC     ; Represent an atomic load-bic
1144     UNSPECV_ATOMIC_LDOP_XOR     ; Represent an atomic load-xor
1145     UNSPECV_ATOMIC_LDOP_PLUS    ; Represent an atomic load-add
1148 ;; -------------------------------------------------------------------
1149 ;; Mode attributes
1150 ;; -------------------------------------------------------------------
1152 ;; "e" for signaling operations, "" for quiet operations.
1153 (define_mode_attr e [(CCFP "") (CCFPE "e")])
1155 ;; In GPI templates, a string like "%<w>0" will expand to "%w0" in the
1156 ;; 32-bit version and "%x0" in the 64-bit version.
1157 (define_mode_attr w [(QI "w") (HI "w") (SI "w") (DI "x") (SF "s") (DF "d")])
1159 ;; The size of access, in bytes.
1160 (define_mode_attr ldst_sz [(SI "4") (DI "8")])
1161 ;; Likewise for load/store pair.
1162 (define_mode_attr ldpstp_sz [(SI "8") (DI "16")])
1164 ;; Size of element access for STP/LDP-generated vectors.
1165 (define_mode_attr ldpstp_vel_sz [(V2SI "8") (V2SF "8") (V2DI "16") (V2DF "16")])
1167 ;; For inequal width int to float conversion
1168 (define_mode_attr w1 [(HF "w") (SF "w") (DF "x")])
1169 (define_mode_attr w2 [(HF "x") (SF "x") (DF "w")])
1171 ;; For width of fp registers in fcvt instruction
1172 (define_mode_attr fpw [(DI "s") (SI "d")])
1174 (define_mode_attr short_mask [(HI "65535") (QI "255")])
1176 (define_mode_attr half_mask [(HI "255") (SI "65535") (DI "4294967295")])
1178 ;; For constraints used in scalar immediate vector moves
1179 (define_mode_attr hq [(HI "h") (QI "q")])
1181 ;; For doubling width of an integer mode
1182 (define_mode_attr DWI [(QI "HI") (HI "SI") (SI "DI") (DI "TI")])
1184 (define_mode_attr fcvt_change_mode [(SI "df") (DI "sf")])
1186 (define_mode_attr FCVT_CHANGE_MODE [(SI "DF") (DI "SF")])
1188 ;; For scalar usage of vector/FP registers
1189 (define_mode_attr v [(QI "b") (HI "h") (SI "s") (DI "d")
1190                     (HF  "h") (SF "s") (DF "d")
1191                     (V8QI "") (V16QI "")
1192                     (V4HI "") (V8HI "")
1193                     (V2SI "") (V4SI  "")
1194                     (V2DI "") (V2SF "")
1195                     (V4SF "") (V4HF "")
1196                     (V8HF "") (V2DF "")])
1198 ;; For scalar usage of vector/FP registers, narrowing
1199 (define_mode_attr vn2 [(QI "") (HI "b") (SI "h") (DI "s")
1200                     (V8QI "") (V16QI "")
1201                     (V4HI "") (V8HI "")
1202                     (V2SI "") (V4SI  "")
1203                     (V2DI "") (V2SF "")
1204                     (V4SF "") (V2DF "")])
1206 ;; For scalar usage of vector/FP registers, widening
1207 (define_mode_attr vw2 [(DI "") (QI "h") (HI "s") (SI "d")
1208                     (V8QI "") (V16QI "")
1209                     (V4HI "") (V8HI "")
1210                     (V2SI "") (V4SI  "")
1211                     (V2DI "") (V2SF "")
1212                     (V4SF "") (V2DF "")])
1214 ;; Register Type Name and Vector Arrangement Specifier for when
1215 ;; we are doing scalar for DI and SIMD for SI (ignoring all but
1216 ;; lane 0).
1217 (define_mode_attr rtn [(DI "d") (SI "")])
1218 (define_mode_attr vas [(DI "") (SI ".2s")])
1220 ;; Map a vector to the number of units in it, if the size of the mode
1221 ;; is constant.
1222 (define_mode_attr nunits [(V8QI "8") (V16QI "16")
1223                           (V4HI "4") (V8HI "8")
1224                           (V2SI "2") (V4SI "4")
1225                           (V1DI "1") (V2DI "2")
1226                           (V4HF "4") (V8HF "8")
1227                           (V4BF "4") (V8BF "8")
1228                           (V2SF "2") (V4SF "4")
1229                           (V1DF "1") (V2DF "2")
1230                           (DI "1") (DF "1")
1231                           (V8DI "8")])
1233 ;; Map a mode to the number of bits in it, if the size of the mode
1234 ;; is constant.
1235 (define_mode_attr bitsize [(V8QI "64") (V16QI "128")
1236                            (V4HI "64") (V8HI "128")
1237                            (V2SI "64") (V4SI "128")
1238                                        (V2DI "128")])
1240 ;; Map a floating point or integer mode to the appropriate register name prefix
1241 (define_mode_attr s [(HF "h") (SF "s") (DF "d") (SI "s") (DI "d")])
1243 ;; Give the length suffix letter for a sign- or zero-extension.
1244 (define_mode_attr size [(QI "b") (HI "h") (SI "w")])
1246 ;; Give the number of bits in the mode
1247 (define_mode_attr sizen [(QI "8") (HI "16") (SI "32") (DI "64")])
1248 (define_mode_attr ZEROM [(QI "SI") (HI "SI") (SI "SI") (DI "DI")])
1249 (define_mode_attr zerom [(QI "si") (HI "si") (SI "si") (DI "di")])
1251 ;; Give the ordinal of the MSB in the mode
1252 (define_mode_attr sizem1 [(QI "#7") (HI "#15") (SI "#31") (DI "#63")
1253                           (HF "#15") (SF "#31") (DF "#63")])
1255 ;; The number of bits in a vector element, or controlled by a predicate
1256 ;; element.
1257 (define_mode_attr elem_bits [(VNx16BI "8") (VNx8BI "16")
1258                              (VNx4BI "32") (VNx2BI "64")
1259                              (VNx16QI "8") (VNx32QI "8") (VNx64QI "8")
1260                              (VNx8HI "16") (VNx16HI "16") (VNx32HI "16")
1261                              (VNx8HF "16") (VNx16HF "16") (VNx32HF "16")
1262                              (VNx8BF "16") (VNx16BF "16") (VNx32BF "16")
1263                              (VNx4SI "32") (VNx8SI "32") (VNx16SI "32")
1264                              (VNx4SF "32") (VNx8SF "32") (VNx16SF "32")
1265                              (VNx2DI "64") (VNx4DI "64") (VNx8DI "64")
1266                              (VNx2DF "64") (VNx4DF "64") (VNx8DF "64")
1267                              (VNx1TI "128")])
1269 ;; The number of bits in a vector container.
1270 (define_mode_attr container_bits [(VNx16QI "8")
1271                                   (VNx8HI "16") (VNx8QI "16") (VNx8HF "16")
1272                                   (VNx8BF "16")
1273                                   (VNx4SI "32") (VNx4HI "32") (VNx4QI "32")
1274                                   (VNx4SF "32") (VNx4HF "32") (VNx4BF "32")
1275                                   (VNx2DI "64") (VNx2SI "64") (VNx2HI "64")
1276                                   (VNx2QI "64") (VNx2DF "64") (VNx2SF "64")
1277                                   (VNx2HF "64") (VNx2BF "64")])
1279 ;; Attribute to describe constants acceptable in logical operations
1280 (define_mode_attr lconst [(SI "K") (DI "L")])
1282 ;; Attribute to describe constants acceptable in logical and operations
1283 (define_mode_attr lconst2 [(SI "UsO") (DI "UsP")])
1285 ;; Map a mode to a specific constraint character.
1286 (define_mode_attr cmode [(QI "q") (HI "h") (SI "s") (DI "d")])
1288 ;; Map modes to Usg and Usj constraints for SISD right shifts
1289 (define_mode_attr cmode_simd [(SI "g") (DI "j")])
1291 (define_mode_attr Vtype [(V8QI "8b") (V16QI "16b")
1292                          (V4HI "4h") (V8HI  "8h")
1293                          (V4BF "4h") (V8BF  "8h")
1294                          (V2SI "2s") (V4SI  "4s")
1295                          (DI   "1d") (DF    "1d")
1296                          (V2DI "2d") (V2SF "2s")
1297                          (V4SF "4s") (V2DF "2d")
1298                          (V4HF "4h") (V8HF "8h")
1299                          (V2x8QI "8b") (V2x4HI "4h")
1300                          (V2x2SI "2s") (V2x1DI  "1d")
1301                          (V2x4HF "4h") (V2x2SF "2s")
1302                          (V2x1DF "1d") (V2x4BF "4h")
1303                          (V2x16QI "16b") (V2x8HI "8h")
1304                          (V2x4SI "4s") (V2x2DI "2d")
1305                          (V2x8HF "8h") (V2x4SF "4s")
1306                          (V2x2DF "2d") (V2x8BF "8h")
1307                          (V3x8QI "8b") (V3x4HI "4h")
1308                          (V3x2SI "2s") (V3x1DI "1d")
1309                          (V3x4HF "4h") (V3x2SF "2s")
1310                          (V3x1DF "1d") (V3x4BF "4h")
1311                          (V3x16QI "16b") (V3x8HI "8h")
1312                          (V3x4SI "4s") (V3x2DI "2d")
1313                          (V3x8HF "8h") (V3x4SF "4s")
1314                          (V3x2DF "2d") (V3x8BF "8h")
1315                          (V4x8QI "8b") (V4x4HI "4h")
1316                          (V4x2SI "2s") (V4x1DI "1d")
1317                          (V4x4HF "4h") (V4x2SF "2s")
1318                          (V4x1DF "1d") (V4x4BF "4h")
1319                          (V4x16QI "16b") (V4x8HI "8h")
1320                          (V4x4SI "4s") (V4x2DI "2d")
1321                          (V4x8HF "8h") (V4x4SF "4s")
1322                          (V4x2DF "2d") (V4x8BF "8h")])
1324 ;; Map mode to type used in widening multiplies.
1325 (define_mode_attr Vcondtype [(V4HI "4h") (V8HI "4h") (V2SI "2s") (V4SI "2s")])
1327 ;; Map lane mode to name
1328 (define_mode_attr Qlane [(V4HI "_v4hi") (V8HI  "q_v4hi")
1329                          (V2SI "_v2si") (V4SI  "q_v2si")])
1331 (define_mode_attr Vrevsuff [(V4HI "16") (V8HI "16") (V2SI "32")
1332                             (V4SI "32") (V2DI "64")])
1334 (define_mode_attr Vmtype [(V8QI ".8b") (V16QI ".16b")
1335                          (V4HI ".4h") (V8HI  ".8h")
1336                          (V2SI ".2s") (V4SI  ".4s")
1337                          (V2DI ".2d") (V4HF ".4h")
1338                          (V8HF ".8h") (V4BF ".4h")
1339                          (V8BF ".8h") (V2SF ".2s")
1340                          (V4SF ".4s") (V2DF ".2d")
1341                          (DI   "")    (SI   "")
1342                          (HI   "")    (QI   "")
1343                          (TI   "")    (HF   "")
1344                          (SF   "")    (DF   "")])
1346 ;; Register suffix narrowed modes for VQN.
1347 (define_mode_attr Vmntype [(V8HI ".8b") (V4SI ".4h")
1348                            (V2DI ".2s")
1349                            (DI   "")    (SI   "")
1350                            (HI   "")])
1352 ;; Mode-to-individual element type mapping.
1353 (define_mode_attr Vetype [(V8QI "b") (V16QI "b")
1354                           (V4HI "h") (V8HI  "h")
1355                           (V2SI "s") (V4SI  "s")
1356                           (V2DI "d") (V1DI  "d")
1357                           (V4HF "h") (V8HF  "h")
1358                           (V2SF "s") (V4SF  "s")
1359                           (V2DF "d") (V1DF  "d")
1360                           (V2x8QI "b") (V2x4HI "h")
1361                           (V2x2SI "s") (V2x1DI "d")
1362                           (V2x4HF "h") (V2x2SF "s")
1363                           (V2x1DF "d") (V2x4BF "h")
1364                           (V2x16QI "b") (V2x8HI "h")
1365                           (V2x4SI "s") (V2x2DI "d")
1366                           (V2x8HF "h") (V2x4SF "s")
1367                           (V2x2DF "d") (V2x8BF "h")
1368                           (V3x8QI "b") (V3x4HI "h")
1369                           (V3x2SI "s") (V3x1DI "d")
1370                           (V3x4HF "h") (V3x2SF "s")
1371                           (V3x1DF "d") (V3x4BF "h")
1372                           (V3x16QI "b") (V3x8HI "h")
1373                           (V3x4SI "s") (V3x2DI "d")
1374                           (V3x8HF "h") (V3x4SF "s")
1375                           (V3x2DF "d") (V3x8BF "h")
1376                           (V4x8QI "b") (V4x4HI "h")
1377                           (V4x2SI "s") (V4x1DI "d")
1378                           (V4x4HF "h") (V4x2SF "s")
1379                           (V4x1DF "d") (V4x4BF "h")
1380                           (V4x16QI "b") (V4x8HI "h")
1381                           (V4x4SI "s") (V4x2DI "d")
1382                           (V4x8HF "h") (V4x4SF "s")
1383                           (V4x2DF "d") (V4x8BF "h")
1384                           (VNx16BI "b") (VNx8BI "h") (VNx4BI "s") (VNx2BI "d")
1385                           (VNx16QI "b") (VNx8QI "b") (VNx4QI "b") (VNx2QI "b")
1386                           (VNx8HI "h") (VNx4HI "h") (VNx2HI "h")
1387                           (VNx8HF "h") (VNx4HF "h") (VNx2HF "h")
1388                           (VNx8BF "h") (VNx4BF "h") (VNx2BF "h")
1389                           (VNx4SI "s") (VNx2SI "s")
1390                           (VNx4SF "s") (VNx2SF "s")
1391                           (VNx2DI "d")
1392                           (VNx2DF "d")
1393                           (VNx1TI "q")
1394                           (VNx32QI "b") (VNx64QI "b")
1395                           (VNx16HI "h") (VNx32HI "h")
1396                           (VNx16HF "h") (VNx32HF "h")
1397                           (VNx16BF "h") (VNx32BF "h")
1398                           (VNx8SI "s") (VNx16SI "s")
1399                           (VNx8SF "s") (VNx16SF "s")
1400                           (VNx4DI "d") (VNx8DI "d")
1401                           (VNx4DF "d") (VNx8DF "d")
1402                           (BF "h") (V4BF "h") (V8BF "h")
1403                           (HF "h")
1404                           (SF "s") (DF "d")
1405                           (QI "b") (HI "h")
1406                           (SI "s") (DI "d")])
1408 ;; Like Vetype, but map to types that are a quarter of the element size.
1409 (define_mode_attr Vetype_fourth [(VNx4SI "b") (VNx2DI "h")])
1411 ;; Equivalent of "size" for a vector element.
1412 (define_mode_attr Vesize [(VNx16QI "b") (VNx8QI "b") (VNx4QI "b") (VNx2QI "b")
1413                           (VNx8HI "h") (VNx4HI "h") (VNx2HI "h")
1414                           (VNx8HF "h") (VNx4HF "h") (VNx2HF "h")
1415                           (VNx8BF "h") (VNx4BF "h") (VNx2BF "h")
1416                           (VNx4SI "w") (VNx2SI "w")
1417                           (VNx4SF "w") (VNx2SF "w")
1418                           (VNx2DI "d")
1419                           (VNx2DF "d")
1420                           (VNx1TI "q")
1421                           (VNx32QI "b") (VNx48QI "b") (VNx64QI "b")
1422                           (VNx16HI "h") (VNx24HI "h") (VNx32HI "h")
1423                           (VNx16HF "h") (VNx24HF "h") (VNx32HF "h")
1424                           (VNx16BF "h") (VNx24BF "h") (VNx32BF "h")
1425                           (VNx8SI  "w") (VNx12SI "w") (VNx16SI "w")
1426                           (VNx8SF  "w") (VNx12SF "w") (VNx16SF "w")
1427                           (VNx4DI  "d") (VNx6DI  "d") (VNx8DI  "d")
1428                           (VNx4DF  "d") (VNx6DF  "d") (VNx8DF  "d")])
1430 ;; The Z register suffix for an SVE mode's element container, i.e. the
1431 ;; Vetype of full SVE modes that have the same number of elements.
1432 (define_mode_attr Vctype [(VNx16QI "b") (VNx8QI "h") (VNx4QI "s") (VNx2QI "d")
1433                           (VNx8HI "h") (VNx4HI "s") (VNx2HI "d")
1434                           (VNx8HF "h") (VNx4HF "s") (VNx2HF "d")
1435                           (VNx8BF "h") (VNx4BF "s") (VNx2BF "d")
1436                           (VNx4SI "s") (VNx2SI "d")
1437                           (VNx4SF "s") (VNx2SF "d")
1438                           (VNx2DI "d")
1439                           (VNx2DF "d")])
1441 ;; The instruction mnemonic suffix for an SVE mode's element container,
1442 ;; i.e. the Vewtype of full SVE modes that have the same number of elements.
1443 (define_mode_attr Vcwtype [(VNx16QI "b") (VNx8QI "h") (VNx4QI "w") (VNx2QI "d")
1444                            (VNx8HI "h") (VNx4HI "w") (VNx2HI "d")
1445                            (VNx8HF "h") (VNx4HF "w") (VNx2HF "d")
1446                            (VNx8BF "h") (VNx4BF "w") (VNx2BF "d")
1447                            (VNx4SI "w") (VNx2SI "d")
1448                            (VNx4SF "w") (VNx2SF "d")
1449                            (VNx2DI "d")
1450                            (VNx2DF "d")])
1452 ;; Vetype is used everywhere in scheduling type and assembly output,
1453 ;; sometimes they are not the same, for example HF modes on some
1454 ;; instructions.  stype is defined to represent scheduling type
1455 ;; more accurately.
1456 (define_mode_attr stype [(V8QI "b") (V16QI "b") (V4HI "s") (V8HI "s")
1457                          (V2SI "s") (V4SI "s") (V2DI "d") (V4HF "s")
1458                          (V8HF "s") (V2SF "s") (V4SF "s") (V2DF "d")
1459                          (HF "s") (SF "s") (DF "d") (QI "b") (HI "s")
1460                          (SI "s") (DI "d")])
1462 ;; Mode-to-bitwise operation type mapping.
1463 (define_mode_attr Vbtype [(V8QI "8b")  (V16QI "16b")
1464                           (V4HI "8b") (V8HI  "16b")
1465                           (V2SI "8b") (V4SI  "16b")
1466                           (V2DI "16b") (V4HF "8b")
1467                           (V8HF "16b") (V2SF  "8b")
1468                           (V4SF "16b") (V2DF  "16b")
1469                           (DI   "8b")  (DF    "8b")
1470                           (SI   "8b")  (SF    "8b")
1471                           (QI   "8b")  (HI    "8b")
1472                           (V4BF "8b")  (V8BF  "16b")])
1474 ;; Advanced SIMD vector structure to element modes.
1475 (define_mode_attr VSTRUCT_ELT [(V2x8QI "V8QI") (V2x4HI "V4HI")
1476                                (V2x2SI "V2SI") (V2x1DI "DI")
1477                                (V2x4HF "V4HF") (V2x2SF "V2SF")
1478                                (V2x1DF "DF") (V2x4BF "V4BF")
1479                                (V3x8QI "V8QI") (V3x4HI "V4HI")
1480                                (V3x2SI "V2SI") (V3x1DI "DI")
1481                                (V3x4HF "V4HF") (V3x2SF "V2SF")
1482                                (V3x1DF "DF") (V3x4BF "V4BF")
1483                                (V4x8QI "V8QI") (V4x4HI "V4HI")
1484                                (V4x2SI "V2SI") (V4x1DI "DI")
1485                                (V4x4HF "V4HF") (V4x2SF "V2SF")
1486                                (V4x1DF "DF") (V4x4BF "V4BF")
1487                                (V2x16QI "V16QI") (V2x8HI "V8HI")
1488                                (V2x4SI "V4SI") (V2x2DI "V2DI")
1489                                (V2x8HF "V8HF") (V2x4SF "V4SF")
1490                                (V2x2DF "V2DF") (V2x8BF "V8BF")
1491                                (V3x16QI "V16QI") (V3x8HI "V8HI")
1492                                (V3x4SI "V4SI") (V3x2DI "V2DI")
1493                                (V3x8HF "V8HF") (V3x4SF "V4SF")
1494                                (V3x2DF "V2DF") (V3x8BF "V8BF")
1495                                (V4x16QI "V16QI") (V4x8HI "V8HI")
1496                                (V4x4SI "V4SI") (V4x2DI "V2DI")
1497                                (V4x8HF "V8HF") (V4x4SF "V4SF")
1498                                (V4x2DF "V2DF") (V4x8BF "V8BF")])
1500 ;; Advanced SIMD vector structure to element modes in lower case.
1501 (define_mode_attr vstruct_elt [(V2x8QI "v8qi") (V2x4HI "v4hi")
1502                                (V2x2SI "v2si") (V2x1DI "di")
1503                                (V2x4HF "v4hf") (V2x2SF "v2sf")
1504                                (V2x1DF "df") (V2x4BF "v4bf")
1505                                (V3x8QI "v8qi") (V3x4HI "v4hi")
1506                                (V3x2SI "v2si") (V3x1DI "di")
1507                                (V3x4HF "v4hf") (V3x2SF "v2sf")
1508                                (V3x1DF "df") (V3x4BF "v4bf")
1509                                (V4x8QI "v8qi") (V4x4HI "v4hi")
1510                                (V4x2SI "v2si") (V4x1DI "di")
1511                                (V4x4HF "v4hf") (V4x2SF "v2sf")
1512                                (V4x1DF "df") (V4x4BF "v4bf")
1513                                (V2x16QI "v16qi") (V2x8HI "v8hi")
1514                                (V2x4SI "v4si") (V2x2DI "v2di")
1515                                (V2x8HF "v8hf") (V2x4SF "v4sf")
1516                                (V2x2DF "v2df") (V2x8BF "v8bf")
1517                                (V3x16QI "v16qi") (V3x8HI "v8hi")
1518                                (V3x4SI "v4si") (V3x2DI "v2di")
1519                                (V3x8HF "v8hf") (V3x4SF "v4sf")
1520                                (V3x2DF "v2df") (V3x8BF "v8bf")
1521                                (V4x16QI "v16qi") (V4x8HI "v8hi")
1522                                (V4x4SI "v4si") (V4x2DI "v2di")
1523                                (V4x8HF "v8hf") (V4x4SF "v4sf")
1524                                (V4x2DF "v2df") (V4x8BF "v8bf")])
1526 ;; Define element mode for each vector mode.
1527 (define_mode_attr VEL [(V8QI  "QI") (V16QI "QI")
1528                        (V4HI "HI") (V8HI  "HI")
1529                        (V2SI "SI") (V4SI  "SI")
1530                        (DI   "DI") (V1DI  "DI")
1531                        (V2DI "DI")
1532                        (V4HF "HF") (V8HF  "HF")
1533                        (V2SF "SF") (V4SF  "SF")
1534                        (DF   "DF") (V1DF  "DF")
1535                        (V2DF "DF")
1536                        (SI   "SI") (HI    "HI")
1537                        (QI   "QI")
1538                        (V4BF "BF") (V8BF "BF")
1539                        (VNx16QI "QI") (VNx8QI "QI") (VNx4QI "QI") (VNx2QI "QI")
1540                        (VNx8HI "HI") (VNx4HI "HI") (VNx2HI "HI")
1541                        (VNx8HF "HF") (VNx4HF "HF") (VNx2HF "HF")
1542                        (VNx8BF "BF") (VNx4BF "BF") (VNx2BF "BF")
1543                        (VNx4SI "SI") (VNx2SI "SI")
1544                        (VNx4SF "SF") (VNx2SF "SF")
1545                        (VNx2DI "DI")
1546                        (VNx2DF "DF")])
1548 ;; Define element mode for each vector mode (lower case).
1549 (define_mode_attr Vel [(V8QI "qi") (V16QI "qi")
1550                        (V4HI "hi") (V8HI "hi")
1551                        (V2SI "si") (V4SI "si")
1552                        (DI   "di") (V1DI "si")
1553                        (V2DI "di")
1554                        (V4HF "hf") (V8HF "hf")
1555                        (V2SF "sf") (V4SF "sf")
1556                        (V1DF "df") (V2DF "df")
1557                        (DF   "df") (SI   "si")
1558                        (HI   "hi") (QI   "qi")
1559                        (V4BF "bf") (V8BF "bf")
1560                        (VNx16QI "qi") (VNx8QI "qi") (VNx4QI "qi") (VNx2QI "qi")
1561                        (VNx8HI "hi") (VNx4HI "hi") (VNx2HI "hi")
1562                        (VNx8HF "hf") (VNx4HF "hf") (VNx2HF "hf")
1563                        (VNx8BF "bf") (VNx4BF "bf") (VNx2BF "bf")
1564                        (VNx4SI "si") (VNx2SI "si")
1565                        (VNx4SF "sf") (VNx2SF "sf")
1566                        (VNx2DI "di")
1567                        (VNx2DF "df")])
1569 ;; Element mode with floating-point values replaced by like-sized integers.
1570 (define_mode_attr VEL_INT [(VNx16QI "QI")
1571                            (VNx8HI  "HI") (VNx8HF "HI") (VNx8BF "HI")
1572                            (VNx4SI  "SI") (VNx4SF "SI")
1573                            (VNx2DI  "DI") (VNx2DF "DI")])
1575 ;; Gives the mode of the 128-bit lowpart of an SVE vector.
1576 (define_mode_attr V128 [(VNx16QI "V16QI")
1577                         (VNx8HI  "V8HI") (VNx8HF "V8HF") (VNx8BF "V8BF")
1578                         (VNx4SI  "V4SI") (VNx4SF "V4SF")
1579                         (VNx2DI  "V2DI") (VNx2DF "V2DF")])
1581 ;; ...and again in lower case.
1582 (define_mode_attr v128 [(VNx16QI "v16qi")
1583                         (VNx8HI  "v8hi") (VNx8HF "v8hf") (VNx8BF "v8bf")
1584                         (VNx4SI  "v4si") (VNx4SF "v4sf")
1585                         (VNx2DI  "v2di") (VNx2DF "v2df")])
1587 (define_mode_attr vnx [(V4SI "vnx4si") (V2DI "vnx2di")])
1589 ;; 64-bit container modes the inner or scalar source mode.
1590 (define_mode_attr VCOND [(HI "V4HI") (SI "V2SI")
1591                          (V4HI "V4HI") (V8HI "V4HI")
1592                          (V2SI "V2SI") (V4SI "V2SI")
1593                          (DI   "DI") (V2DI "DI")
1594                          (V4HF "V4HF") (V8HF "V4HF")
1595                          (V2SF "V2SF") (V4SF "V2SF")
1596                          (V2DF "DF")])
1598 ;; 128-bit container modes the inner or scalar source mode.
1599 (define_mode_attr VCONQ [(V8QI "V16QI") (V16QI "V16QI")
1600                          (V4HI "V8HI") (V8HI "V8HI")
1601                          (V2SI "V4SI") (V4SI "V4SI")
1602                          (DI   "V2DI") (V2DI "V2DI")
1603                          (V4HF "V8HF") (V8HF "V8HF")
1604                          (V2SF "V4SF") (V4SF "V4SF")
1605                          (V2DF "V2DF") (SI   "V4SI")
1606                          (HI   "V8HI") (QI   "V16QI")
1607                          (SF   "V4SF") (DF   "V2DF")])
1609 ;; Half modes of all vector modes.
1610 (define_mode_attr VHALF [(V8QI "V4QI")  (V16QI "V8QI")
1611                          (V4HI "V2HI")  (V8HI  "V4HI")
1612                          (V2SI "SI")    (V4SI  "V2SI")
1613                          (V2DI "DI")    (V2SF  "SF")
1614                          (V4SF "V2SF")  (V4HF "V2HF")
1615                          (V8HF "V4HF")  (V2DF  "DF")
1616                          (V8BF "V4BF")])
1618 ;; Half modes of all vector modes, in lower-case.
1619 (define_mode_attr Vhalf [(V8QI "v4qi")  (V16QI "v8qi")
1620                          (V4HI "v2hi")  (V8HI  "v4hi")
1621                          (V8HF  "v4hf") (V8BF  "v4bf")
1622                          (V2SI "si")    (V4SI  "v2si")
1623                          (V2DI "di")    (V2SF  "sf")
1624                          (V4SF "v2sf")  (V2DF  "df")])
1626 ;; Single-element half modes of quad vector modes.
1627 (define_mode_attr V1HALF [(V2DI "V1DI")  (V2DF  "V1DF")])
1629 ;; Single-element half modes of quad vector modes, in lower-case
1630 (define_mode_attr V1half [(V2DI "v1di")  (V2DF  "v1df")])
1632 ;; Double modes of vector modes.
1633 (define_mode_attr VDBL [(V8QI "V16QI") (V4HI "V8HI")
1634                         (V4HF "V8HF")  (V4BF "V8BF")
1635                         (V2SI "V4SI")  (V2SF "V4SF")
1636                         (SI   "V2SI")  (SF   "V2SF")
1637                         (DI   "V2DI")  (DF   "V2DF")])
1639 ;; Load/store pair mode.
1640 (define_mode_attr VPAIR [(SI "V2x4QI") (DI "V2x8QI")])
1642 ;; Register suffix for double-length mode.
1643 (define_mode_attr Vdtype [(V4HF "8h") (V2SF "4s")])
1645 ;; Double modes of vector modes (lower case).
1646 (define_mode_attr Vdbl [(V8QI "v16qi") (V4HI "v8hi")
1647                         (V4HF "v8hf")  (V4BF "v8bf")
1648                         (V2SI "v4si")  (V2SF "v4sf")
1649                         (SI   "v2si")  (DI   "v2di")
1650                         (DF   "v2df")])
1652 ;; Modes with double-width elements.
1653 (define_mode_attr VDBLW [(V8QI "V4HI") (V16QI "V8HI")
1654                   (V4HI "V2SI") (V8HI "V4SI")
1655                   (V2SI "DI")   (V4SI "V2DI")])
1657 (define_mode_attr VQUADW [(V8QI "V4SI") (V16QI "V8SI")
1658                   (V4HI "V2DI") (V8HI "V4DI")])
1660 ;; Narrowed modes for VDN.
1661 (define_mode_attr VNARROWD [(V4HI "V8QI") (V2SI "V4HI")
1662                             (DI   "V2SI")])
1663 (define_mode_attr Vnarrowd [(V4HI "v8qi") (V2SI "v4hi")
1664                             (DI   "v2si")])
1666 ;; Narrowed double-modes for VQN (Used for XTN).
1667 (define_mode_attr VNARROWQ [(V8HI "V8QI") (V4SI "V4HI")
1668                             (V2DI "V2SI")
1669                             (DI   "SI")   (SI   "HI")
1670                             (HI   "QI")])
1671 (define_mode_attr Vnarrowq [(V8HI "v8qi") (V4SI "v4hi")
1672                             (V2DI "v2si")])
1674 ;; Narrowed quad-modes for VQN (Used for XTN2).
1675 (define_mode_attr VNARROWQ2 [(V8HI "V16QI") (V4SI "V8HI")
1676                              (V2DI "V4SI")])
1677 (define_mode_attr Vnarrowq2 [(V8HI "v16qi") (V4SI "v8hi")
1678                              (V2DI "v4si")])
1680 ;; Narrowed modes of vector modes.
1681 (define_mode_attr VNARROW [(VNx8HI "VNx16QI")
1682                            (VNx4SI "VNx8HI") (VNx4SF "VNx8HF")
1683                            (VNx2DI "VNx4SI") (VNx2DF "VNx4SF")
1684                            (VNx8SI "VNx8HI") (VNx16SI "VNx16QI")
1685                            (VNx8DI "VNx8HI")])
1687 ;; Register suffix narrowed modes for VQN.
1688 (define_mode_attr Vntype [(V8HI "8b") (V4SI "4h")
1689                           (V2DI "2s")])
1691 ;; Register suffix narrowed modes for VQN.
1692 (define_mode_attr V2ntype [(V8HI "16b") (V4SI "8h")
1693                            (V2DI "4s")])
1695 ;; Widened modes of vector modes.
1696 (define_mode_attr VWIDE [(V8QI  "V8HI")  (V4HI  "V4SI")
1697                          (V2SI  "V2DI")  (V16QI "V8HI")
1698                          (V8HI  "V4SI")  (V4SI  "V2DI")
1699                          (HI    "SI")    (SI    "DI")
1700                          (V8HF  "V4SF")  (V4SF  "V2DF")
1701                          (V4HF  "V4SF")  (V2SF  "V2DF")
1702                          (VNx8HF  "VNx4SF") (VNx4SF "VNx2DF")
1703                          (VNx16QI "VNx8HI") (VNx8HI "VNx4SI")
1704                          (VNx4SI  "VNx2DI")
1705                          (VNx16BI "VNx8BI") (VNx8BI "VNx4BI")
1706                          (VNx4BI  "VNx2BI")])
1708 ;; Modes with the same number of elements but strictly 2x the width.
1709 (define_mode_attr V2XWIDE [(V8QI "V8HI") (V4HI "V4SI")
1710                            (V16QI "V16HI") (V8HI "V8SI")
1711                            (V2SI "V2DI") (V4SI "V4DI")
1712                            (V2DI "V2TI") (DI "TI")
1713                            (HI "SI") (SI "DI")
1714                            (VNx16QI "VNx16HI")
1715                            (VNx8HI "VNx8SI")
1716                            (VNx4SI "VNx4DI")
1717                            (VNx32QI "VNx32HI")
1718                            (VNx16HI "VNx16SI")
1719                            (VNx8SI "VNx8DI")])
1721 (define_mode_attr v2xwide [(V8QI "v8hi") (V4HI "v4si")
1722                            (V16QI "v16hi") (V8HI "v8si")
1723                            (V2SI "v2di") (V4SI "v4di")
1724                            (V2DI "v2ti") (DI "ti")
1725                            (HI "si") (SI "di")
1726                            (VNx16QI "vnx16hi")
1727                            (VNx8HI "vnx8si")
1728                            (VNx4SI "vnx4di")
1729                            (VNx32QI "vnx32hi")
1730                            (VNx16HI "vnx16si")
1731                            (VNx8SI "vnx8di")])
1733 ;; Predicate mode associated with VWIDE.
1734 (define_mode_attr VWIDE_PRED [(VNx8HF "VNx4BI") (VNx4SF "VNx2BI")])
1736 ;; Widened modes of vector modes, lowercase
1737 (define_mode_attr Vwide [(V2SF "v2df") (V4HF "v4sf")
1738                          (VNx16QI "vnx8hi") (VNx8HI "vnx4si")
1739                          (VNx4SI  "vnx2di")
1740                          (VNx8HF  "vnx4sf") (VNx4SF "vnx2df")
1741                          (VNx16BI "vnx8bi") (VNx8BI "vnx4bi")
1742                          (VNx4BI  "vnx2bi")])
1744 ;; Widened mode register suffixes for VD_BHSI/VQW/VQ_HSF.
1745 (define_mode_attr Vwtype [(V8QI "8h") (V4HI "4s")
1746                           (V2SI "2d") (V16QI "8h")
1747                           (V8HI "4s") (V4SI "2d")
1748                           (V8HF "4s") (V4SF "2d")])
1750 ;; Widened scalar register suffixes.
1751 (define_mode_attr Vwstype [(V8QI "h") (V4HI "s")
1752                           (V2SI "") (V16QI "h")
1753                           (V8HI "s") (V4SI "d")])
1754 ;; Add a .1d for V2SI.
1755 (define_mode_attr Vwsuf [(V8QI "") (V4HI "")
1756                           (V2SI ".1d") (V16QI "")
1757                           (V8HI "") (V4SI "")])
1759 ;; Scalar mode of widened vector reduction.
1760 (define_mode_attr VWIDE_S [(V8QI "HI") (V4HI "SI")
1761                           (V2SI "DI") (V16QI "HI")
1762                           (V8HI "SI") (V4SI "DI")])
1764 (define_mode_attr VWIDE2X_S [(V8QI "SI") (V4HI "DI")
1765                           (V16QI "SI") (V8HI "DI")])
1767 ;; Widened mode with half the element register suffixes for VD_BHSI/VQW/VQ_HSF.
1768 (define_mode_attr Vwhalf [(V8QI "4h") (V4HI "2s")
1769                           (V2SI "1d") (V16QI "8h")
1770                           (V8HI "4s") (V4SI "2d")])
1772 ;; SVE vector after narrowing.
1773 (define_mode_attr Ventype [(VNx8HI "b")
1774                            (VNx4SI "h") (VNx4SF "h")
1775                            (VNx2DI "s") (VNx2DF "s")
1776                            (VNx8SI "h") (VNx16SI "b")
1777                            (VNx8DI "h")])
1779 ;; SVE vector after widening.
1780 (define_mode_attr Vewtype [(VNx16QI "h")
1781                            (VNx8HI  "s") (VNx8HF "s")
1782                            (VNx4SI  "d") (VNx4SF "d")
1783                            (VNx2DI  "q")])
1785 ;; Widened mode register suffixes for VDW/VQW.
1786 (define_mode_attr Vmwtype [(V8QI ".8h") (V4HI ".4s")
1787                            (V2SI ".2d") (V16QI ".8h")
1788                            (V8HI ".4s") (V4SI ".2d")
1789                            (V4HF ".4s") (V2SF ".2d")
1790                            (SI   "")    (HI   "")])
1792 ;; Lower part register suffixes for VQW/VQ_HSF.
1793 (define_mode_attr Vhalftype [(V16QI "8b") (V8HI "4h")
1794                              (V4SI "2s") (V8HF "4h")
1795                              (V4SF "2s")])
1797 ;; Whether a mode fits in W or X registers (i.e. "w" for 32-bit modes
1798 ;; and "x" for 64-bit modes).
1799 (define_mode_attr single_wx [(SI   "w") (SF   "w")
1800                              (V8QI "x") (V4HI "x")
1801                              (V4HF "x") (V4BF "x")
1802                              (V2SI "x") (V2SF "x")
1803                              (DI   "x") (DF   "x")])
1805 ;; Whether a mode fits in S or D registers (i.e. "s" for 32-bit modes
1806 ;; and "d" for 64-bit modes).
1807 (define_mode_attr single_type [(SI   "s") (SF   "s")
1808                                (V8QI "d") (V4HI "d")
1809                                (V4HF "d") (V4BF "d")
1810                                (V2SI "d") (V2SF "d")
1811                                (DI   "d") (DF   "d")])
1813 ;; Whether a double-width mode fits in D or Q registers (i.e. "d" for
1814 ;; 32-bit modes and "q" for 64-bit modes).
1815 (define_mode_attr single_dtype [(SI   "d") (SF   "d")
1816                                 (V8QI "q") (V4HI "q")
1817                                 (V4HF "q") (V4BF "q")
1818                                 (V2SI "q") (V2SF "q")
1819                                 (DI   "q") (DF   "q")])
1821 ;; Define corresponding core/FP element mode for each vector mode.
1822 (define_mode_attr vw [(V8QI "w") (V16QI "w")
1823                       (V4HI "w") (V8HI "w")
1824                       (V2SI "w") (V4SI "w")
1825                       (DI   "x") (V2DI "x")
1826                       (V2SF "s") (V4SF "s")
1827                       (V2DF "d")])
1829 ;; Corresponding core element mode for each vector mode.  This is a
1830 ;; variation on <vw> mapping FP modes to GP regs.
1831 (define_mode_attr vwcore [(V8QI "w") (V16QI "w")
1832                           (V4HI "w") (V8HI "w")
1833                           (V2SI "w") (V4SI "w")
1834                           (DI   "x") (V2DI "x")
1835                           (V4HF "w") (V8HF "w")
1836                           (V4BF "w") (V8BF "w")
1837                           (V2SF "w") (V4SF "w")
1838                           (V2DF "x")
1839                           (VNx16QI "w") (VNx8QI "w") (VNx4QI "w") (VNx2QI "w")
1840                           (VNx8HI "w") (VNx4HI "w") (VNx2HI "w")
1841                           (VNx8HF "w") (VNx4HF "w") (VNx2HF "w")
1842                           (VNx8BF "w") (VNx4BF "w") (VNx2BF "w")
1843                           (VNx4SI "w") (VNx2SI "w")
1844                           (VNx4SF "w") (VNx2SF "w")
1845                           (VNx2DI "x")
1846                           (VNx2DF "x")])
1848 ;; Like vwcore, but for the container mode rather than the element mode.
1849 (define_mode_attr vccore [(VNx16QI "w") (VNx8QI "w") (VNx4QI "w") (VNx2QI "x")
1850                           (VNx8HI "w") (VNx4HI "w") (VNx2HI "x")
1851                           (VNx4SI "w") (VNx2SI "x")
1852                           (VNx2DI "x")])
1854 ;; Double vector types for ALLX.
1855 (define_mode_attr Vallxd [(QI "8b") (HI "4h") (SI "2s")])
1857 ;; Mode with floating-point values replaced by like-sized integers.
1858 (define_mode_attr V_INT_EQUIV [(V8QI "V8QI") (V16QI "V16QI")
1859                                (V4HI "V4HI") (V8HI  "V8HI")
1860                                (V2SI "V2SI") (V4SI  "V4SI")
1861                                (DI   "DI")   (V2DI  "V2DI")
1862                                (V4HF "V4HI") (V8HF  "V8HI")
1863                                (V4BF "V4HI") (V8BF  "V8HI")
1864                                (V2SF "V2SI") (V4SF  "V4SI")
1865                                (DF   "DI")   (V2DF  "V2DI")
1866                                (SF   "SI")   (SI    "SI")
1867                                (HF    "HI")
1868                                (VNx16QI "VNx16QI")
1869                                (VNx8HI  "VNx8HI") (VNx8HF "VNx8HI")
1870                                (VNx8BF  "VNx8HI")
1871                                (VNx4SI  "VNx4SI") (VNx4SF "VNx4SI")
1872                                (VNx2DI  "VNx2DI") (VNx2DF "VNx2DI")
1873                                (VNx8SF  "VNx8SI") (VNx16SF "VNx16SI")
1876 ;; Lower case mode with floating-point values replaced by like-sized integers.
1877 (define_mode_attr v_int_equiv [(V8QI "v8qi") (V16QI "v16qi")
1878                                (V4HI "v4hi") (V8HI  "v8hi")
1879                                (V2SI "v2si") (V4SI  "v4si")
1880                                (DI   "di")   (V2DI  "v2di")
1881                                (V4HF "v4hi") (V8HF  "v8hi")
1882                                (V4BF "v4hi") (V8BF  "v8hi")
1883                                (V2SF "v2si") (V4SF  "v4si")
1884                                (DF   "di")   (V2DF  "v2di")
1885                                (SF   "si")
1886                                (VNx16QI "vnx16qi")
1887                                (VNx8HI  "vnx8hi") (VNx8HF "vnx8hi")
1888                                (VNx8BF  "vnx8hi")
1889                                (VNx4SI  "vnx4si") (VNx4SF "vnx4si")
1890                                (VNx2DI  "vnx2di") (VNx2DF "vnx2di")
1891                                (VNx8SF  "vnx8si") (VNx16SF "vnx16si")
1894 ;; Floating-point equivalent of selected modes.
1895 (define_mode_attr V_FP_EQUIV [(VNx8HI "VNx8HF") (VNx8HF "VNx8HF")
1896                               (VNx8BF "VNx8HF")
1897                               (VNx4SI "VNx4SF") (VNx4SF "VNx4SF")
1898                               (VNx2DI "VNx2DF") (VNx2DF "VNx2DF")])
1899 (define_mode_attr v_fp_equiv [(VNx8HI "vnx8hf") (VNx8HF "vnx8hf")
1900                               (VNx8BF "vnx8hf")
1901                               (VNx4SI "vnx4sf") (VNx4SF "vnx4sf")
1902                               (VNx2DI "vnx2df") (VNx2DF "vnx2df")])
1904 ;; Maps full and partial vector modes of any element type to a full-vector
1905 ;; integer mode with the same number of units.
1906 (define_mode_attr V_INT_CONTAINER [(VNx16QI "VNx16QI") (VNx8QI "VNx8HI")
1907                                    (VNx4QI "VNx4SI") (VNx2QI "VNx2DI")
1908                                    (VNx8HI "VNx8HI") (VNx4HI "VNx4SI")
1909                                    (VNx2HI "VNx2DI")
1910                                    (VNx4SI "VNx4SI") (VNx2SI "VNx2DI")
1911                                    (VNx2DI "VNx2DI")
1912                                    (VNx8HF "VNx8HI") (VNx4HF "VNx4SI")
1913                                    (VNx2HF "VNx2DI")
1914                                    (VNx8BF "VNx8HI") (VNx4BF "VNx4SI")
1915                                    (VNx2BF "VNx2DI")
1916                                    (VNx4SF "VNx4SI") (VNx2SF "VNx2DI")
1917                                    (VNx2DF "VNx2DI")])
1919 ;; Lower-case version of V_INT_CONTAINER.
1920 (define_mode_attr v_int_container [(VNx16QI "vnx16qi") (VNx8QI "vnx8hi")
1921                                    (VNx4QI "vnx4si") (VNx2QI "vnx2di")
1922                                    (VNx8HI "vnx8hi") (VNx4HI "vnx4si")
1923                                    (VNx2HI "vnx2di")
1924                                    (VNx4SI "vnx4si") (VNx2SI "vnx2di")
1925                                    (VNx2DI "vnx2di")
1926                                    (VNx8HF "vnx8hi") (VNx4HF "vnx4si")
1927                                    (VNx2HF "vnx2di")
1928                                    (VNx8BF "vnx8hi") (VNx4BF "vnx4si")
1929                                    (VNx2BF "vnx2di")
1930                                    (VNx4SF "vnx4si") (VNx2SF "vnx2di")
1931                                    (VNx2DF "vnx2di")])
1933 ;; Mode for vector conditional operations where the comparison has
1934 ;; different type from the lhs.
1935 (define_mode_attr V_cmp_mixed [(V2SI "V2SF") (V4SI "V4SF")
1936                                (V2DI "V2DF") (V2SF "V2SI")
1937                                (V4SF "V4SI") (V2DF "V2DI")])
1939 (define_mode_attr v_cmp_mixed [(V2SI "v2sf") (V4SI "v4sf")
1940                                (V2DI "v2df") (V2SF "v2si")
1941                                (V4SF "v4si") (V2DF "v2di")])
1943 ;; Lower case element modes (as used in shift immediate patterns).
1944 (define_mode_attr ve_mode [(V8QI "qi") (V16QI "qi")
1945                            (V4HI "hi") (V8HI  "hi")
1946                            (V2SI "si") (V4SI  "si")
1947                            (DI   "di") (V2DI  "di")
1948                            (QI   "qi") (HI    "hi")
1949                            (SI   "si")])
1951 ;; Like ve_mode but for the half-width modes.
1952 (define_mode_attr vn_mode [(V8HI  "qi") (V4SI  "hi") (V2DI  "si")])
1954 ;; Vm for lane instructions is restricted to FP_LO_REGS.
1955 (define_mode_attr vwx [(V4HI "x") (V8HI "x") (HI "x")
1956                        (V2SI "w") (V4SI "w") (SI "w")])
1958 (define_mode_attr Vendreg [(OI "T") (CI "U") (XI "V")
1959                            (V2x8QI "T") (V2x16QI "T")
1960                            (V2x4HI "T") (V2x8HI "T")
1961                            (V2x2SI "T") (V2x4SI "T")
1962                            (V2x1DI "T") (V2x2DI "T")
1963                            (V2x4HF "T") (V2x8HF "T")
1964                            (V2x2SF "T") (V2x4SF "T")
1965                            (V2x1DF "T") (V2x2DF "T")
1966                            (V2x4BF "T") (V2x8BF "T")
1967                            (V3x8QI "U") (V3x16QI "U")
1968                            (V3x4HI "U") (V3x8HI "U")
1969                            (V3x2SI "U") (V3x4SI "U")
1970                            (V3x1DI "U") (V3x2DI "U")
1971                            (V3x4HF "U") (V3x8HF "U")
1972                            (V3x2SF "U") (V3x4SF "U")
1973                            (V3x1DF "U") (V3x2DF "U")
1974                            (V3x4BF "U") (V3x8BF "U")
1975                            (V4x8QI "V") (V4x16QI "V")
1976                            (V4x4HI "V") (V4x8HI "V")
1977                            (V4x2SI "V") (V4x4SI "V")
1978                            (V4x1DI "V") (V4x2DI "V")
1979                            (V4x4HF "V") (V4x8HF "V")
1980                            (V4x2SF "V") (V4x4SF "V")
1981                            (V4x1DF "V") (V4x2DF "V")
1982                            (V4x4BF "V") (V4x8BF "V")])
1984 ;; This is both the number of Q-Registers needed to hold the corresponding
1985 ;; opaque large integer mode, and the number of elements touched by the
1986 ;; ld..._lane and st..._lane operations.
1987 (define_mode_attr nregs [(OI "2") (CI "3") (XI "4")
1988                          (V2x8QI "2") (V2x16QI "2")
1989                          (V2x4HI "2") (V2x8HI "2")
1990                          (V2x2SI "2") (V2x4SI "2")
1991                          (V2x1DI "2") (V2x2DI "2")
1992                          (V2x4HF "2") (V2x8HF "2")
1993                          (V2x2SF "2") (V2x4SF "2")
1994                          (V2x1DF "2") (V2x2DF "2")
1995                          (V2x4BF "2") (V2x8BF "2")
1996                          (V3x8QI "3") (V3x16QI "3")
1997                          (V3x4HI "3") (V3x8HI "3")
1998                          (V3x2SI "3") (V3x4SI "3")
1999                          (V3x1DI "3") (V3x2DI "3")
2000                          (V3x4HF "3") (V3x8HF "3")
2001                          (V3x2SF "3") (V3x4SF "3")
2002                          (V3x1DF "3") (V3x2DF "3")
2003                          (V3x4BF "3") (V3x8BF "3")
2004                          (V4x8QI "4") (V4x16QI "4")
2005                          (V4x4HI "4") (V4x8HI "4")
2006                          (V4x2SI "4") (V4x4SI "4")
2007                          (V4x1DI "4") (V4x2DI "4")
2008                          (V4x4HF "4") (V4x8HF "4")
2009                          (V4x2SF "4") (V4x4SF "4")
2010                          (V4x1DF "4") (V4x2DF "4")
2011                          (V4x4BF "4") (V4x8BF "4")])
2013 ;; Mode for atomic operation suffixes
2014 (define_mode_attr atomic_sfx
2015   [(QI "b") (HI "h") (SI "") (DI "")])
2017 (define_mode_attr fcvt_target [(V2DF "v2di") (V4SF "v4si") (V2SF "v2si")
2018                                (V2DI "v2df") (V4SI "v4sf") (V2SI "v2sf")
2019                                (SF "si") (DF "di") (SI "sf") (DI "df")
2020                                (V4HF "v4hi") (V8HF "v8hi") (V4HI "v4hf")
2021                                (V8HI "v8hf") (HF "hi") (HI "hf")])
2022 (define_mode_attr FCVT_TARGET [(V2DF "V2DI") (V4SF "V4SI") (V2SF "V2SI")
2023                                (V2DI "V2DF") (V4SI "V4SF") (V2SI "V2SF")
2024                                (SF "SI") (DF "DI") (SI "SF") (DI "DF")
2025                                (V4HF "V4HI") (V8HF "V8HI") (V4HI "V4HF")
2026                                (V8HI "V8HF") (HF "HI") (HI "HF")])
2029 ;; for the inequal width integer to fp conversions
2030 (define_mode_attr fcvt_iesize [(HF "di") (SF "di") (DF "si")])
2031 (define_mode_attr FCVT_IESIZE [(HF "DI") (SF "DI") (DF "SI")])
2033 (define_mode_attr VSWAP_WIDTH [(V8QI "V16QI") (V16QI "V8QI")
2034                                 (V4HI "V8HI") (V8HI  "V4HI")
2035                                 (V8BF "V4BF") (V4BF  "V8BF")
2036                                 (V2SI "V4SI") (V4SI  "V2SI")
2037                                 (DI   "V2DI") (V2DI  "DI")
2038                                 (V2SF "V4SF") (V4SF  "V2SF")
2039                                 (V4HF "V8HF") (V8HF  "V4HF")
2040                                 (DF   "V2DF") (V2DF  "DF")])
2042 (define_mode_attr vswap_width_name [(V8QI "to_128") (V16QI "to_64")
2043                                     (V4HI "to_128") (V8HI  "to_64")
2044                                     (V2SI "to_128") (V4SI  "to_64")
2045                                     (DI   "to_128") (V2DI  "to_64")
2046                                     (V4HF "to_128") (V8HF  "to_64")
2047                                     (V2SF "to_128") (V4SF  "to_64")
2048                                     (V4BF "to_128") (V8BF  "to_64")
2049                                     (DF   "to_128") (V2DF  "to_64")])
2051 ;; For certain vector-by-element multiplication instructions we must
2052 ;; constrain the 16-bit cases to use only V0-V15.  This is covered by
2053 ;; the 'x' constraint.  All other modes may use the 'w' constraint.
2054 (define_mode_attr h_con [(V2SI "w") (V4SI "w")
2055                          (V4HI "x") (V8HI "x")
2056                          (V4HF "x") (V8HF "x")
2057                          (V2SF "w") (V4SF "w")
2058                          (V2DF "w") (DF "w")])
2060 ;; Defined to 'f' for types whose element type is a float type.
2061 (define_mode_attr f [(V8QI "")  (V16QI "")
2062                      (V4HI "")  (V8HI  "")
2063                      (V2SI "")  (V4SI  "")
2064                      (DI   "")  (V2DI  "")
2065                      (V4HF "f") (V8HF  "f")
2066                      (V2SF "f") (V4SF  "f")
2067                      (V2DF "f") (DF    "f")])
2069 ;; Defined to '_fp' for types whose element type is a float type.
2070 (define_mode_attr fp [(V8QI "")  (V16QI "")
2071                       (V4HI "")  (V8HI  "")
2072                       (V2SI "")  (V4SI  "")
2073                       (DI   "")  (V2DI  "")
2074                       (V4HF "_fp") (V8HF  "_fp")
2075                       (V2SF "_fp") (V4SF  "_fp")
2076                       (V2DF "_fp") (DF    "_fp")
2077                       (SF "_fp")])
2079 ;; Defined to '_q' for 128-bit types.
2080 (define_mode_attr q [(V8QI "") (V16QI "_q")
2081                      (V4HI "") (V8HI  "_q")
2082                      (V4BF "") (V8BF  "_q")
2083                      (V2SI "") (V4SI  "_q")
2084                      (DI   "") (V2DI  "_q")
2085                      (V4HF "") (V8HF "_q")
2086                      (V4BF "") (V8BF "_q")
2087                      (V2SF "") (V4SF  "_q")
2088                                (V2DF  "_q")
2089                      (QI "") (HI "") (SI "") (DI "") (HF "") (SF "") (DF "")
2090                      (V2x8QI "") (V2x16QI "_q")
2091                      (V2x4HI "") (V2x8HI "_q")
2092                      (V2x2SI "") (V2x4SI "_q")
2093                      (V2x1DI "") (V2x2DI "_q")
2094                      (V2x4HF "") (V2x8HF "_q")
2095                      (V2x2SF "") (V2x4SF "_q")
2096                      (V2x1DF "") (V2x2DF "_q")
2097                      (V2x4BF "") (V2x8BF "_q")
2098                      (V3x8QI "") (V3x16QI "_q")
2099                      (V3x4HI "") (V3x8HI "_q")
2100                      (V3x2SI "") (V3x4SI "_q")
2101                      (V3x1DI "") (V3x2DI "_q")
2102                      (V3x4HF "") (V3x8HF "_q")
2103                      (V3x2SF "") (V3x4SF "_q")
2104                      (V3x1DF "") (V3x2DF "_q")
2105                      (V3x4BF "") (V3x8BF "_q")
2106                      (V4x8QI "") (V4x16QI "_q")
2107                      (V4x4HI "") (V4x8HI "_q")
2108                      (V4x2SI "") (V4x4SI "_q")
2109                      (V4x1DI "") (V4x2DI "_q")
2110                      (V4x4HF "") (V4x8HF "_q")
2111                      (V4x2SF "") (V4x4SF "_q")
2112                      (V4x1DF "") (V4x2DF "_q")
2113                      (V4x4BF "") (V4x8BF "_q")])
2115 ;; Equivalent of the "q" attribute for the <VDBL> mode.
2116 (define_mode_attr dblq [(SI   "") (SF   "")
2117                         (V8QI "_q") (V4HI "_q")
2118                         (V4HF "_q") (V4BF "_q")
2119                         (V2SI "_q") (V2SF "_q")
2120                         (DI   "_q") (DF   "_q")])
2122 (define_mode_attr vp [(V8QI "v") (V16QI "v")
2123                       (V4HI "v") (V8HI  "v")
2124                       (V2SI "p") (V4SI  "v")
2125                       (V2DI "p") (V2DF  "p")
2126                       (V2SF "p") (V4SF  "v")
2127                       (V4HF "v") (V8HF  "v")])
2129 (define_mode_attr vsi2qi [(V2SI "v8qi") (V4SI "v16qi")
2130                           (VNx4SI "vnx16qi") (VNx2DI "vnx8hi")])
2131 (define_mode_attr VSI2QI [(V2SI "V8QI") (V4SI "V16QI")
2132                           (VNx4SI "VNx16QI") (VNx2DI "VNx8HI")])
2135 ;; Register suffix for DOTPROD input types from the return type.
2136 (define_mode_attr Vdottype [(V2SI "8b") (V4SI "16b")])
2138 ;; Register suffix for BFDOT input types from the return type.
2139 (define_mode_attr Vbfdottype [(V2SF "4h") (V4SF "8h")])
2141 ;; Sum of lengths of instructions needed to move vector registers of a mode.
2142 (define_mode_attr insn_count [(OI "8") (CI "12") (XI "16")
2143                               (V2x8QI "8") (V2x16QI "8")
2144                               (V2x4HI "8") (V2x8HI "8")
2145                               (V2x2SI "8") (V2x4SI "8")
2146                               (V2x1DI "8") (V2x2DI "8")
2147                               (V2x4HF "8") (V2x8HF "8")
2148                               (V2x2SF "8") (V2x4SF "8")
2149                               (V2x1DF "8") (V2x2DF "8")
2150                               (V2x4BF "8") (V2x8BF "8")
2151                               (V3x8QI "12") (V3x16QI "12")
2152                               (V3x4HI "12") (V3x8HI "12")
2153                               (V3x2SI "12") (V3x4SI "12")
2154                               (V3x1DI "12") (V3x2DI "12")
2155                               (V3x4HF "12") (V3x8HF "12")
2156                               (V3x2SF "12") (V3x4SF "12")
2157                               (V3x1DF "12") (V3x2DF "12")
2158                               (V3x4BF "12") (V3x8BF "12")
2159                               (V4x8QI "16") (V4x16QI "16")
2160                               (V4x4HI "16") (V4x8HI "16")
2161                               (V4x2SI "16") (V4x4SI "16")
2162                               (V4x1DI "16") (V4x2DI "16")
2163                               (V4x4HF "16") (V4x8HF "16")
2164                               (V4x2SF "16") (V4x4SF "16")
2165                               (V4x1DF "16") (V4x2DF "16")
2166                               (V4x4BF "16") (V4x8BF "16")])
2168 ;; -fpic small model GOT reloc modifers: gotpage_lo15/lo14 for ILP64/32.
2169 ;; No need of iterator for -fPIC as it use got_lo12 for both modes.
2170 (define_mode_attr got_modifier [(SI "gotpage_lo14") (DI "gotpage_lo15")])
2172 ;; Width of 2nd and 3rd arguments to fp16 vector multiply add/sub
2173 (define_mode_attr VFMLA_W [(V2SF "V4HF") (V4SF "V8HF")])
2175 ;; Width of 2nd and 3rd arguments to bf16 vector multiply add/sub
2176 (define_mode_attr VBFMLA_W [(V2SF "V4BF") (V4SF "V8BF")])
2178 (define_mode_attr VFMLA_SEL_W [(V2SF "V2HF") (V4SF "V4HF")])
2180 (define_mode_attr f16quad [(V2SF "") (V4SF "q")])
2182 (define_mode_attr isquadop [(V8QI "") (V16QI "q") (V4BF "") (V8BF "q")])
2184 (define_code_attr f16mac [(plus "a") (minus "s")])
2186 ;; Map smax to smin and umax to umin.
2187 (define_code_attr max_opp [(smax "smin") (umax "umin")])
2189 ;; Same as above, but louder.
2190 (define_code_attr MAX_OPP [(smax "SMIN") (umax "UMIN")])
2192 ;; Map smax and umax to sign_extend and zero_extend
2193 (define_code_attr USMAX_EXT [(smax "sign_extend") (umax "zero_extend")])
2195 ;; The number of subvectors in an SVE_STRUCT.
2196 (define_mode_attr vector_count [(VNx32QI "2") (VNx16HI "2")
2197                                 (VNx8SI  "2") (VNx4DI  "2")
2198                                 (VNx16BF "2")
2199                                 (VNx16HF "2") (VNx8SF  "2") (VNx4DF "2")
2200                                 (VNx48QI "3") (VNx24HI "3")
2201                                 (VNx12SI "3") (VNx6DI  "3")
2202                                 (VNx24BF "3")
2203                                 (VNx24HF "3") (VNx12SF "3") (VNx6DF "3")
2204                                 (VNx64QI "4") (VNx32HI "4")
2205                                 (VNx16SI "4") (VNx8DI  "4")
2206                                 (VNx32BF "4")
2207                                 (VNx32HF "4") (VNx16SF "4") (VNx8DF "4")])
2209 ;; The number of instruction bytes needed for an SVE_STRUCT move.  This is
2210 ;; equal to vector_count * 4.
2211 (define_mode_attr insn_length [(VNx32QI "8")  (VNx16HI "8")
2212                                (VNx8SI  "8")  (VNx4DI  "8")
2213                                (VNx16BF "8")
2214                                (VNx16HF "8")  (VNx8SF  "8")  (VNx4DF "8")
2215                                (VNx48QI "12") (VNx24HI "12")
2216                                (VNx12SI "12") (VNx6DI  "12")
2217                                (VNx24BF "12")
2218                                (VNx24HF "12") (VNx12SF "12") (VNx6DF "12")
2219                                (VNx64QI "16") (VNx32HI "16")
2220                                (VNx16SI "16") (VNx8DI  "16")
2221                                (VNx32BF "16")
2222                                (VNx32HF "16") (VNx16SF "16") (VNx8DF "16")])
2224 ;; The type of a subvector in an SVE_STRUCT.
2225 (define_mode_attr VSINGLE [(VNx16QI "VNx16QI")
2226                            (VNx8BF "VNx8BF")
2227                            (VNx8HF "VNx8HF")
2228                            (VNx8HI "VNx8HI")
2229                            (VNx32QI "VNx16QI")
2230                            (VNx16HI "VNx8HI") (VNx16HF "VNx8HF")
2231                            (VNx16BF "VNx8BF")
2232                            (VNx8SI "VNx4SI") (VNx8SF "VNx4SF")
2233                            (VNx4DI "VNx2DI") (VNx4DF "VNx2DF")
2234                            (VNx48QI "VNx16QI")
2235                            (VNx24HI "VNx8HI") (VNx24HF "VNx8HF")
2236                            (VNx24BF "VNx8BF")
2237                            (VNx12SI "VNx4SI") (VNx12SF "VNx4SF")
2238                            (VNx6DI "VNx2DI") (VNx6DF "VNx2DF")
2239                            (VNx64QI "VNx16QI")
2240                            (VNx32HI "VNx8HI") (VNx32HF "VNx8HF")
2241                            (VNx32BF "VNx8BF")
2242                            (VNx16SI "VNx4SI") (VNx16SF "VNx4SF")
2243                            (VNx8DI "VNx2DI") (VNx8DF "VNx2DF")])
2245 ;; ...and again in lower case.
2246 (define_mode_attr vsingle [(VNx8HI "vnx8hi")
2247                            (VNx32QI "vnx16qi")
2248                            (VNx16HI "vnx8hi") (VNx16HF "vnx8hf")
2249                            (VNx16BF "vnx8bf")
2250                            (VNx8SI "vnx4si") (VNx8SF "vnx4sf")
2251                            (VNx4DI "vnx2di") (VNx4DF "vnx2df")
2252                            (VNx48QI "vnx16qi")
2253                            (VNx24HI "vnx8hi") (VNx24HF "vnx8hf")
2254                            (VNx24BF "vnx8bf")
2255                            (VNx12SI "vnx4si") (VNx12SF "vnx4sf")
2256                            (VNx6DI "vnx2di") (VNx6DF "vnx2df")
2257                            (VNx64QI "vnx16qi")
2258                            (VNx32HI "vnx8hi") (VNx32HF "vnx8hf")
2259                            (VNx32BF "vnx8bf")
2260                            (VNx16SI "vnx4si") (VNx16SF "vnx4sf")
2261                            (VNx8DI "vnx2di") (VNx8DF "vnx2df")])
2263 ;; The predicate mode associated with an SVE data mode.  For structure modes
2264 ;; this is equivalent to the <VPRED> of the subvector mode.
2265 (define_mode_attr VPRED [(VNx16QI "VNx16BI") (VNx8QI "VNx8BI")
2266                          (VNx4QI "VNx4BI") (VNx2QI "VNx2BI")
2267                          (VNx8HI "VNx8BI") (VNx4HI "VNx4BI") (VNx2HI "VNx2BI")
2268                          (VNx8HF "VNx8BI") (VNx4HF "VNx4BI") (VNx2HF "VNx2BI")
2269                          (VNx8BF "VNx8BI") (VNx4BF "VNx4BI") (VNx2BF "VNx2BI")
2270                          (VNx4SI "VNx4BI") (VNx2SI "VNx2BI")
2271                          (VNx4SF "VNx4BI") (VNx2SF "VNx2BI")
2272                          (VNx2DI "VNx2BI")
2273                          (VNx2DF "VNx2BI")
2274                          (VNx1TI "VNx2BI")
2275                          (VNx32QI "VNx16BI")
2276                          (VNx16HI "VNx8BI") (VNx16HF "VNx8BI")
2277                          (VNx16BF "VNx8BI")
2278                          (VNx8SI "VNx4BI") (VNx8SF "VNx4BI")
2279                          (VNx4DI "VNx2BI") (VNx4DF "VNx2BI")
2280                          (VNx48QI "VNx16BI")
2281                          (VNx24HI "VNx8BI") (VNx24HF "VNx8BI")
2282                          (VNx24BF "VNx8BI")
2283                          (VNx12SI "VNx4BI") (VNx12SF "VNx4BI")
2284                          (VNx6DI "VNx2BI") (VNx6DF "VNx2BI")
2285                          (VNx64QI "VNx16BI")
2286                          (VNx32HI "VNx8BI") (VNx32HF "VNx8BI")
2287                          (VNx32BF "VNx8BI")
2288                          (VNx16SI "VNx4BI") (VNx16SF "VNx4BI")
2289                          (VNx8DI "VNx2BI") (VNx8DF "VNx2BI")
2290                          (V8QI "VNx8BI") (V16QI "VNx16BI")
2291                          (V4HI "VNx4BI") (V8HI "VNx8BI") (V2SI "VNx2BI")
2292                          (V4SI "VNx4BI") (V2DI "VNx2BI")])
2294 ;; ...and again in lower case.
2295 (define_mode_attr vpred [(VNx16QI "vnx16bi") (VNx8QI "vnx8bi")
2296                          (VNx4QI "vnx4bi") (VNx2QI "vnx2bi")
2297                          (VNx8HI "vnx8bi") (VNx4HI "vnx4bi") (VNx2HI "vnx2bi")
2298                          (VNx8HF "vnx8bi") (VNx4HF "vnx4bi") (VNx2HF "vnx2bi")
2299                          (VNx8BF "vnx8bi") (VNx4BF "vnx4bi") (VNx2BF "vnx2bi")
2300                          (VNx4SI "vnx4bi") (VNx2SI "vnx2bi")
2301                          (VNx4SF "vnx4bi") (VNx2SF "vnx2bi")
2302                          (VNx2DI "vnx2bi")
2303                          (VNx2DF "vnx2bi")
2304                          (VNx32QI "vnx16bi")
2305                          (VNx16HI "vnx8bi") (VNx16HF "vnx8bi")
2306                          (VNx16BF "vnx8bi")
2307                          (VNx8SI "vnx4bi") (VNx8SF "vnx4bi")
2308                          (VNx4DI "vnx2bi") (VNx4DF "vnx2bi")
2309                          (VNx48QI "vnx16bi")
2310                          (VNx24HI "vnx8bi") (VNx24HF "vnx8bi")
2311                          (VNx24BF "vnx8bi")
2312                          (VNx12SI "vnx4bi") (VNx12SF "vnx4bi")
2313                          (VNx6DI "vnx2bi") (VNx6DF "vnx2bi")
2314                          (VNx64QI "vnx16bi")
2315                          (VNx32HI "vnx8bi") (VNx32HF "vnx4bi")
2316                          (VNx32BF "vnx8bi")
2317                          (VNx16SI "vnx4bi") (VNx16SF "vnx4bi")
2318                          (VNx8DI "vnx2bi") (VNx8DF "vnx2bi")])
2320 (define_mode_attr VDOUBLE [(VNx16QI "VNx32QI")
2321                            (VNx8HI "VNx16HI") (VNx8HF "VNx16HF")
2322                            (VNx8BF "VNx16BF")
2323                            (VNx4SI "VNx8SI") (VNx4SF "VNx8SF")
2324                            (VNx2DI "VNx4DI") (VNx2DF "VNx4DF")])
2326 ;; On AArch64 the By element instruction doesn't have a 2S variant.
2327 ;; However because the instruction always selects a pair of values
2328 ;; The normal 3SAME instruction can be used here instead.
2329 (define_mode_attr FCMLA_maybe_lane [(V2SF "<Vtype>") (V4SF "<Vetype>[%4]")
2330                                     (V4HF "<Vetype>[%4]") (V8HF "<Vetype>[%4]")
2331                                     ])
2333 (define_mode_attr za32_offset_range [(VNx16QI "0_to_12_step_4")
2334                                      (VNx8BF "0_to_14_step_2")
2335                                      (VNx8HF "0_to_14_step_2")
2336                                      (VNx8HI "0_to_14_step_2")
2337                                      (VNx32QI "0_to_4_step_4")
2338                                      (VNx16BF "0_to_6_step_2")
2339                                      (VNx16HF "0_to_6_step_2")
2340                                      (VNx16HI "0_to_6_step_2")
2341                                      (VNx64QI "0_to_4_step_4")
2342                                      (VNx32BF "0_to_6_step_2")
2343                                      (VNx32HF "0_to_6_step_2")
2344                                      (VNx32HI "0_to_6_step_2")])
2346 (define_mode_attr za64_offset_range [(VNx8HI "0_to_12_step_4")
2347                                      (VNx16HI "0_to_4_step_4")
2348                                      (VNx32HI "0_to_4_step_4")])
2350 (define_mode_attr za32_long [(VNx16QI "ll") (VNx32QI "ll") (VNx64QI "ll")
2351                              (VNx8HI "l") (VNx16HI "l") (VNx32HI "l")])
2353 (define_mode_attr za32_last_offset [(VNx16QI "3") (VNx32QI "3") (VNx64QI "3")
2354                                     (VNx8HI "1") (VNx16HI "1") (VNx32HI "1")])
2356 (define_mode_attr vg_modifier [(VNx16QI "")
2357                                (VNx32QI ", vgx2")
2358                                (VNx64QI ", vgx4")
2359                                (VNx8BF "")
2360                                (VNx16BF ", vgx2")
2361                                (VNx32BF ", vgx4")
2362                                (VNx8HF "")
2363                                (VNx16HF ", vgx2")
2364                                (VNx32HF ", vgx4")
2365                                (VNx8HI "")
2366                                (VNx16HI ", vgx2")
2367                                (VNx32HI ", vgx4")])
2369 (define_mode_attr z_suffix [(VNx16QI ".b") (VNx32QI "") (VNx64QI "")
2370                             (VNx8BF ".h") (VNx16BF "") (VNx32BF "")
2371                             (VNx8HF ".h") (VNx16HF "") (VNx32HF "")
2372                             (VNx8HI ".h") (VNx16HI "") (VNx32HI "")])
2374 ;; The number of bytes controlled by a predicate
2375 (define_mode_attr data_bytes [(VNx16BI "1") (VNx8BI "2")
2376                               (VNx4BI "4") (VNx2BI "8")])
2378 ;; Two-nybble mask for partial vector modes: nunits, byte size.
2379 (define_mode_attr self_mask [(VNx8QI "0x81")
2380                              (VNx4QI "0x41")
2381                              (VNx2QI "0x21")
2382                              (VNx4HI "0x42")
2383                              (VNx2HI "0x22")
2384                              (VNx2SI "0x24")])
2386 ;; For SVE_HSDI vector modes, the mask of narrower modes, encoded as above.
2387 (define_mode_attr narrower_mask [(VNx8HI "0x81") (VNx4HI "0x41")
2388                                  (VNx2HI "0x21")
2389                                  (VNx4SI "0x43") (VNx2SI "0x23")
2390                                  (VNx2DI "0x27")])
2392 ;; The constraint to use for an SVE [SU]DOT, FMUL, FMLA or FMLS lane index.
2393 (define_mode_attr sve_lane_con [(VNx8HI "y") (VNx4SI "y") (VNx2DI "x")
2394                                                           (V2DI "x")
2395                                 (VNx8HF "y") (VNx4SF "y") (VNx2DF "x")])
2397 ;; The constraint to use for an SVE FCMLA lane index.
2398 (define_mode_attr sve_lane_pair_con [(VNx8HF "y") (VNx4SF "x")])
2400 (define_mode_attr vec_or_offset [(V8QI "vec") (V16QI "vec") (V4HI "vec")
2401                                  (V8HI "vec") (V2SI "vec") (V4SI "vec")
2402                                  (V2DI "vec") (DI "offset")])
2404 (define_mode_attr b [(VNx8BF "b") (VNx8HF "") (VNx4SF "") (VNx2DF "")
2405                      (VNx16BF "b") (VNx16HF "")
2406                      (VNx32BF "b") (VNx32HF "")])
2408 (define_mode_attr aligned_operand [(VNx16QI "register_operand")
2409                                    (VNx8HI "register_operand")
2410                                    (VNx8BF "register_operand")
2411                                    (VNx8HF "register_operand")
2412                                    (VNx32QI "aligned_register_operand")
2413                                    (VNx16HI "aligned_register_operand")
2414                                    (VNx16BF "aligned_register_operand")
2415                                    (VNx16HF "aligned_register_operand")
2416                                    (VNx64QI "aligned_register_operand")
2417                                    (VNx32HI "aligned_register_operand")
2418                                    (VNx32BF "aligned_register_operand")
2419                                    (VNx32HF "aligned_register_operand")])
2421 (define_mode_attr aligned_fpr [(VNx16QI "w") (VNx8HI "w")
2422                                (VNx8BF "w") (VNx8HF "w")
2423                                (VNx32QI "Uw2") (VNx16HI "Uw2")
2424                                (VNx16BF "Uw2") (VNx16HF "Uw2")
2425                                (VNx64QI "Uw4") (VNx32HI "Uw4")
2426                                (VNx32BF "Uw4") (VNx32HF "Uw4")])
2428 ;; -------------------------------------------------------------------
2429 ;; Code Iterators
2430 ;; -------------------------------------------------------------------
2432 ;; This code iterator allows the various shifts supported on the core
2433 (define_code_iterator SHIFT [ashift ashiftrt lshiftrt rotatert rotate])
2435 ;; This code iterator allows all shifts except for rotates.
2436 (define_code_iterator SHIFT_no_rotate [ashift ashiftrt lshiftrt])
2438 ;; This code iterator allows the shifts supported in arithmetic instructions
2439 (define_code_iterator ASHIFT [ashift ashiftrt lshiftrt])
2441 (define_code_iterator SHIFTRT [ashiftrt lshiftrt])
2443 ;; Code iterator for logical operations
2444 (define_code_iterator LOGICAL [and ior xor])
2446 ;; LOGICAL with plus, for when | gets converted to +.
2447 (define_code_iterator LOGICAL_OR_PLUS [and ior xor plus])
2449 ;; LOGICAL without AND.
2450 (define_code_iterator LOGICAL_OR [ior xor])
2452 ;; Code iterator for logical operations whose :nlogical works on SIMD registers.
2453 (define_code_iterator NLOGICAL [and ior])
2455 ;; Code iterator for unary negate and bitwise complement.
2456 (define_code_iterator NEG_NOT [neg not])
2458 ;; Code iterator for sign/zero extension
2459 (define_code_iterator ANY_EXTEND [sign_extend zero_extend])
2460 (define_code_iterator ANY_EXTEND2 [sign_extend zero_extend])
2462 ;; All division operations (signed/unsigned)
2463 (define_code_iterator ANY_DIV [div udiv])
2465 ;; Code iterator for sign/zero extraction
2466 (define_code_iterator ANY_EXTRACT [sign_extract zero_extract])
2468 ;; Code iterator for equality comparisons
2469 (define_code_iterator EQL [eq ne])
2471 ;; Code iterator for less-than and greater/equal-to
2472 (define_code_iterator LTGE [lt ge])
2474 ;; Iterator for __sync_<op> operations that where the operation can be
2475 ;; represented directly RTL.  This is all of the sync operations bar
2476 ;; nand.
2477 (define_code_iterator atomic_op [plus minus ior xor and])
2479 ;; Iterator for integer conversions
2480 (define_code_iterator FIXUORS [fix unsigned_fix])
2482 ;; Iterator for float conversions
2483 (define_code_iterator FLOATUORS [float unsigned_float])
2485 ;; Code iterator for variants of vector max and min.
2486 (define_code_iterator MAXMIN [smax smin umax umin])
2488 ;; Code iterator for min/max ops but without UMAX.
2489 (define_code_iterator MAXMIN_NOUMAX [smax smin umin])
2491 (define_code_iterator FMAXMIN [smax smin])
2493 ;; Signed and unsigned max operations.
2494 (define_code_iterator USMAX [smax umax])
2496 ;; Code iterator for plus and minus.
2497 (define_code_iterator ADDSUB [plus minus])
2499 ;; Code iterator for variants of vector saturating binary ops.
2500 (define_code_iterator BINQOPS [ss_plus us_plus ss_minus us_minus])
2502 ;; Code iterator for variants of vector saturating unary ops.
2503 (define_code_iterator UNQOPS [ss_neg ss_abs])
2505 ;; Code iterator for signed variants of vector saturating binary ops.
2506 (define_code_iterator SBINQOPS [ss_plus ss_minus])
2508 ;; Code iterator for unsigned variants of vector saturating binary ops.
2509 (define_code_iterator UBINQOPS [us_plus us_minus])
2511 ;; Modular and saturating addition.
2512 (define_code_iterator ANY_PLUS [plus ss_plus us_plus])
2514 ;; Saturating addition.
2515 (define_code_iterator SAT_PLUS [ss_plus us_plus])
2517 ;; Modular and saturating subtraction.
2518 (define_code_iterator ANY_MINUS [minus ss_minus us_minus])
2520 ;; Saturating subtraction.
2521 (define_code_iterator SAT_MINUS [ss_minus us_minus])
2523 ;; Comparison operators for <F>CM.
2524 (define_code_iterator COMPARISONS [lt le eq ge gt])
2526 ;; Unsigned comparison operators.
2527 (define_code_iterator UCOMPARISONS [ltu leu geu gtu])
2529 ;; Unsigned comparison operators.
2530 (define_code_iterator FAC_COMPARISONS [lt le ge gt])
2532 ;; Signed and unsigned saturating truncations.
2533 (define_code_iterator SAT_TRUNC [ss_truncate us_truncate])
2535 (define_code_iterator ALL_TRUNC [ss_truncate us_truncate truncate])
2537 ;; SVE integer unary operations.
2538 (define_code_iterator SVE_INT_UNARY [abs neg not clrsb clz popcount
2539                                      bitreverse
2540                                      (ss_abs "TARGET_SVE2")
2541                                      (ss_neg "TARGET_SVE2")])
2543 ;; SVE integer binary operations.
2544 (define_code_iterator SVE_INT_BINARY [plus minus mult smax umax smin umin
2545                                       ashift ashiftrt lshiftrt
2546                                       and ior xor
2547                                       (ss_plus "TARGET_SVE2")
2548                                       (us_plus "TARGET_SVE2")
2549                                       (ss_minus "TARGET_SVE2")
2550                                       (us_minus "TARGET_SVE2")])
2552 ;; SVE integer binary division operations.
2553 (define_code_iterator SVE_INT_BINARY_SD [div udiv])
2555 ;; SVE integer binary operations that have an immediate form.
2556 (define_code_iterator SVE_INT_BINARY_IMM [mult smax smin umax umin])
2558 (define_code_iterator SVE_INT_BINARY_MULTI [smax smin umax umin])
2560 (define_code_iterator SVE_INT_BINARY_SINGLE [plus smax smin umax umin])
2562 ;; SVE floating-point operations with an unpredicated all-register form.
2563 (define_code_iterator SVE_UNPRED_FP_BINARY [plus minus mult])
2565 ;; SVE integer comparisons.
2566 (define_code_iterator SVE_INT_CMP [lt le eq ne ge gt ltu leu geu gtu])
2568 ;; -------------------------------------------------------------------
2569 ;; Code Attributes
2570 ;; -------------------------------------------------------------------
2571 ;; Map rtl objects to optab names
2572 (define_code_attr optab [(ashift "ashl")
2573                          (ashiftrt "ashr")
2574                          (lshiftrt "lshr")
2575                          (rotatert "rotr")
2576                          (rotate   "rotl")
2577                          (sign_extend "extend")
2578                          (zero_extend "zero_extend")
2579                          (sign_extract "extv")
2580                          (zero_extract "extzv")
2581                          (fix "fix")
2582                          (unsigned_fix "fixuns")
2583                          (float "float")
2584                          (unsigned_float "floatuns")
2585                          (clrsb "clrsb")
2586                          (clz "clz")
2587                          (popcount "popcount")
2588                          (bitreverse "rbit")
2589                          (and "and")
2590                          (ior "ior")
2591                          (xor "xor")
2592                          (not "one_cmpl")
2593                          (neg "neg")
2594                          (plus "add")
2595                          (minus "sub")
2596                          (mult "mul")
2597                          (div "div")
2598                          (udiv "udiv")
2599                          (ss_plus "ssadd")
2600                          (us_plus "usadd")
2601                          (ss_minus "sssub")
2602                          (us_minus "ussub")
2603                          (ss_neg "qneg")
2604                          (ss_abs "qabs")
2605                          (smin "smin")
2606                          (smax "smax")
2607                          (umin "umin")
2608                          (umax "umax")
2609                          (eq "eq")
2610                          (ne "ne")
2611                          (lt "lt")
2612                          (ge "ge")
2613                          (le "le")
2614                          (gt "gt")
2615                          (ltu "ltu")
2616                          (leu "leu")
2617                          (geu "geu")
2618                          (gtu "gtu")
2619                          (abs "abs")])
2621 (define_code_attr addsub [(ss_plus "add")
2622                           (us_plus "add")
2623                           (ss_minus "sub")
2624                           (us_minus "sub")])
2626 (define_code_attr SHIFTEXTEND [(ashiftrt "sign_extend") (lshiftrt "zero_extend")])
2628 (define_code_attr TRUNCEXTEND [(ss_truncate "sign_extend")
2629                                (us_truncate "zero_extend")
2630                                (truncate "zero_extend")])
2632 ;; For comparison operators we use the FCM* and CM* instructions.
2633 ;; As there are no CMLE or CMLT instructions which act on 3 vector
2634 ;; operands, we must use CMGE or CMGT and swap the order of the
2635 ;; source operands.
2637 (define_code_attr n_optab [(lt "gt") (le "ge") (eq "eq") (ge "ge") (gt "gt")
2638                            (ltu "hi") (leu "hs") (geu "hs") (gtu "hi")])
2639 (define_code_attr cmp_1   [(lt "2") (le "2") (eq "1") (ge "1") (gt "1")
2640                            (ltu "2") (leu "2") (geu "1") (gtu "1")])
2641 (define_code_attr cmp_2   [(lt "1") (le "1") (eq "2") (ge "2") (gt "2")
2642                            (ltu "1") (leu "1") (geu "2") (gtu "2")])
2644 (define_code_attr CMP [(lt "LT") (le "LE") (eq "EQ") (ge "GE") (gt "GT")
2645                         (ltu "LTU") (leu "LEU") (ne "NE") (geu "GEU")
2646                         (gtu "GTU")])
2648 ;; The AArch64 condition associated with an rtl comparison code.
2649 (define_code_attr cmp_op [(lt "lt")
2650                           (le "le")
2651                           (eq "eq")
2652                           (ne "ne")
2653                           (ge "ge")
2654                           (gt "gt")
2655                           (ltu "lo")
2656                           (leu "ls")
2657                           (geu "hs")
2658                           (gtu "hi")])
2660 (define_code_attr fix_trunc_optab [(fix "fix_trunc")
2661                                    (unsigned_fix "fixuns_trunc")])
2663 ;; Optab prefix for sign/zero-extending operations
2664 (define_code_attr su_optab [(sign_extend "") (zero_extend "u")
2665                             (div "") (udiv "u")
2666                             (fix "") (unsigned_fix "u")
2667                             (float "s") (unsigned_float "u")
2668                             (ss_plus "s") (us_plus "u")
2669                             (ss_minus "s") (us_minus "u")])
2671 ;; Similar for the instruction mnemonics
2672 (define_code_attr shift [(ashift "lsl") (ashiftrt "asr")
2673                          (lshiftrt "lsr") (rotatert "ror") (rotate "ror")])
2674 ;; True if shift is rotate left.
2675 (define_code_attr is_rotl [(ashift "0") (ashiftrt "0")
2676                            (lshiftrt "0") (rotatert "0") (rotate "1")])
2678 ;; Op prefix for shift right and accumulate.
2679 (define_code_attr sra_op [(ashiftrt "s") (lshiftrt "u")])
2681 ;; op prefix for shift right and narrow.
2682 (define_code_attr srn_op [(ashiftrt "r") (lshiftrt "")])
2684 (define_code_attr shrn_s [(ashiftrt "s") (lshiftrt "")])
2686 ;; Map shift operators onto underlying bit-field instructions
2687 (define_code_attr bfshift [(ashift "ubfiz") (ashiftrt "sbfx")
2688                            (lshiftrt "ubfx") (rotatert "extr")])
2690 ;; Logical operator instruction mnemonics
2691 (define_code_attr logical [(and "and") (ior "orr") (xor "eor")])
2693 ;; Operation names for negate and bitwise complement.
2694 (define_code_attr neg_not_op [(neg "neg") (not "not")])
2696 ;; csinv, csneg insn suffixes.
2697 (define_code_attr neg_not_cs [(neg "neg") (not "inv")])
2699 ;; Similar, but when the second operand is inverted.
2700 (define_code_attr nlogical [(and "bic") (ior "orn") (xor "eon")])
2702 ;; Similar, but when both operands are inverted.
2703 (define_code_attr logical_nn [(and "nor") (ior "nand")])
2705 ;; Sign- or zero-extending data-op
2706 (define_code_attr su [(sign_extend "s") (zero_extend "u")
2707                       (sign_extract "s") (zero_extract "u")
2708                       (fix "s") (unsigned_fix "u")
2709                       (div "s") (udiv "u")
2710                       (smax "s") (umax "u")
2711                       (smin "s") (umin "u")
2712                       (ss_truncate "s") (us_truncate "u")])
2714 ;; "s" for signed ops, empty for unsigned ones.
2715 (define_code_attr s [(sign_extend "s") (zero_extend "")])
2717 ;; Map signed/unsigned ops to the corresponding extension.
2718 (define_code_attr paired_extend [(ss_plus "sign_extend")
2719                                  (us_plus "zero_extend")
2720                                  (ss_minus "sign_extend")
2721                                  (us_minus "zero_extend")])
2723 (define_code_attr TRUNC_SHIFT [(ss_truncate "ashiftrt")
2724                                (us_truncate "lshiftrt") (truncate "lshiftrt")])
2726 (define_code_attr shrn_op [(ss_truncate "sq")
2727                            (us_truncate "uq") (truncate "")])
2729 ;; Whether a shift is left or right.
2730 (define_code_attr lr [(ashift "l") (ashiftrt "r") (lshiftrt "r")])
2732 ;; Emit conditional branch instructions.
2733 (define_code_attr bcond [(eq "beq") (ne "bne") (lt "bne") (ge "beq")])
2735 ;; Emit cbz/cbnz depending on comparison type.
2736 (define_code_attr cbz [(eq "cbz") (ne "cbnz") (lt "cbnz") (ge "cbz")])
2738 ;; Emit inverted cbz/cbnz depending on comparison type.
2739 (define_code_attr inv_cb [(eq "cbnz") (ne "cbz") (lt "cbz") (ge "cbnz")])
2741 ;; Emit tbz/tbnz depending on comparison type.
2742 (define_code_attr tbz [(eq "tbz") (ne "tbnz") (lt "tbnz") (ge "tbz")])
2744 ;; Emit inverted tbz/tbnz depending on comparison type.
2745 (define_code_attr inv_tb [(eq "tbnz") (ne "tbz") (lt "tbz") (ge "tbnz")])
2747 ;; Max/min attributes.
2748 (define_code_attr maxmin [(smax "max")
2749                           (smin "min")
2750                           (umax "max")
2751                           (umin "min")])
2753 (define_code_attr maxminand [(smax "bic") (smin "and")])
2755 ;; MLA/MLS attributes.
2756 (define_code_attr as [(ss_plus "a") (ss_minus "s")])
2758 ;; Atomic operations
2759 (define_code_attr atomic_optab
2760   [(ior "or") (xor "xor") (and "and") (plus "add") (minus "sub")])
2762 (define_code_attr atomic_op_operand
2763   [(ior "aarch64_logical_operand")
2764    (xor "aarch64_logical_operand")
2765    (and "aarch64_logical_operand")
2766    (plus "aarch64_plus_operand")
2767    (minus "aarch64_plus_operand")])
2769 ;; Constants acceptable for atomic operations.
2770 ;; This definition must appear in this file before the iterators it refers to.
2771 (define_code_attr const_atomic
2772  [(plus "IJ") (minus "IJ")
2773   (xor "<lconst_atomic>") (ior "<lconst_atomic>")
2774   (and "<lconst_atomic>")])
2776 ;; Attribute to describe constants acceptable in atomic logical operations
2777 (define_mode_attr lconst_atomic [(QI "K") (HI "K") (SI "K") (DI "L")])
2779 ;; The integer SVE instruction that implements an rtx code.
2780 (define_code_attr sve_int_op [(plus "add")
2781                               (minus "sub")
2782                               (mult "mul")
2783                               (div "sdiv")
2784                               (udiv "udiv")
2785                               (abs "abs")
2786                               (neg "neg")
2787                               (smin "smin")
2788                               (smax "smax")
2789                               (umin "umin")
2790                               (umax "umax")
2791                               (ashift "lsl")
2792                               (ashiftrt "asr")
2793                               (lshiftrt "lsr")
2794                               (and "and")
2795                               (ior "orr")
2796                               (xor "eor")
2797                               (not "not")
2798                               (clrsb "cls")
2799                               (clz "clz")
2800                               (popcount "cnt")
2801                               (bitreverse "rbit")
2802                               (ss_plus "sqadd")
2803                               (us_plus "uqadd")
2804                               (ss_minus "sqsub")
2805                               (us_minus "uqsub")
2806                               (ss_neg "sqneg")
2807                               (ss_abs "sqabs")])
2809 (define_code_attr sve_int_op_rev [(plus "add")
2810                                   (minus "subr")
2811                                   (mult "mul")
2812                                   (div "sdivr")
2813                                   (udiv "udivr")
2814                                   (smin "smin")
2815                                   (smax "smax")
2816                                   (umin "umin")
2817                                   (umax "umax")
2818                                   (ashift "lslr")
2819                                   (ashiftrt "asrr")
2820                                   (lshiftrt "lsrr")
2821                                   (and "and")
2822                                   (ior "orr")
2823                                   (xor "eor")
2824                                   (ss_plus "sqadd")
2825                                   (us_plus "uqadd")
2826                                   (ss_minus "sqsubr")
2827                                   (us_minus "uqsubr")])
2829 ;; The floating-point SVE instruction that implements an rtx code.
2830 (define_code_attr sve_fp_op [(plus "fadd")
2831                              (minus "fsub")
2832                              (mult "fmul")])
2834 ;; The SVE immediate constraint to use for an rtl code.
2835 (define_code_attr sve_imm_con [(mult "vsm")
2836                                (smax "vsm")
2837                                (smin "vsm")
2838                                (umax "vsb")
2839                                (umin "vsb")
2840                                (eq "vsc")
2841                                (ne "vsc")
2842                                (lt "vsc")
2843                                (ge "vsc")
2844                                (le "vsc")
2845                                (gt "vsc")
2846                                (ltu "vsd")
2847                                (leu "vsd")
2848                                (geu "vsd")
2849                                (gtu "vsd")])
2851 ;; The prefix letter to use when printing an immediate operand.
2852 (define_code_attr sve_imm_prefix [(mult "")
2853                                   (smax "")
2854                                   (smin "")
2855                                   (umax "D")
2856                                   (umin "D")])
2858 ;; The predicate to use for the second input operand in a cond_<optab><mode>
2859 ;; pattern.
2860 (define_code_attr sve_pred_int_rhs2_operand
2861   [(plus "register_operand")
2862    (minus "register_operand")
2863    (mult "register_operand")
2864    (smax "register_operand")
2865    (umax "register_operand")
2866    (smin "register_operand")
2867    (umin "register_operand")
2868    (ashift "aarch64_sve_lshift_operand")
2869    (ashiftrt "aarch64_sve_rshift_operand")
2870    (lshiftrt "aarch64_sve_rshift_operand")
2871    (and "aarch64_sve_pred_and_operand")
2872    (ior "register_operand")
2873    (xor "register_operand")
2874    (ss_plus "register_operand")
2875    (us_plus "register_operand")
2876    (ss_minus "register_operand")
2877    (us_minus "register_operand")])
2879 (define_code_attr inc_dec [(minus "dec") (ss_minus "sqdec") (us_minus "uqdec")
2880                            (plus "inc") (ss_plus "sqinc") (us_plus "uqinc")])
2882 ;; -------------------------------------------------------------------
2883 ;; Int Iterators.
2884 ;; -------------------------------------------------------------------
2886 (define_int_iterator MAXMINV [UNSPEC_UMAXV UNSPEC_UMINV
2887                               UNSPEC_SMAXV UNSPEC_SMINV])
2889 (define_int_iterator FMAXMINV [UNSPEC_FMAXV UNSPEC_FMINV
2890                                UNSPEC_FMAXNMV UNSPEC_FMINNMV])
2892 (define_int_iterator FMAXMINNMV [UNSPEC_FMAXNMV UNSPEC_FMINNMV])
2894 (define_int_iterator SVE_INT_ADDV [UNSPEC_SADDV UNSPEC_UADDV])
2896 (define_int_iterator LOGICALF [UNSPEC_ANDF UNSPEC_IORF UNSPEC_XORF])
2898 (define_int_iterator HADDSUB [UNSPEC_SHADD UNSPEC_UHADD
2899                               UNSPEC_SRHADD UNSPEC_URHADD
2900                               UNSPEC_SHSUB UNSPEC_UHSUB])
2902 (define_int_iterator HADD [UNSPEC_SHADD UNSPEC_UHADD])
2904 (define_int_iterator RHADD [UNSPEC_SRHADD UNSPEC_URHADD])
2906 (define_int_iterator BSL_DUP [1 2])
2908 (define_int_iterator DOTPROD [UNSPEC_SDOT UNSPEC_UDOT])
2910 (define_int_iterator DOTPROD_I8MM [UNSPEC_USDOT UNSPEC_SUDOT])
2911 (define_int_iterator DOTPROD_US_ONLY [UNSPEC_USDOT])
2913 (define_int_iterator FMAXMIN_UNS [UNSPEC_FMAX UNSPEC_FMIN
2914                                   UNSPEC_FMAXNM UNSPEC_FMINNM])
2916 (define_int_iterator PAUTH_LR_SP [UNSPEC_PACIASP UNSPEC_AUTIASP
2917                                   UNSPEC_PACIBSP UNSPEC_AUTIBSP])
2919 (define_int_iterator PAUTH_17_16 [UNSPEC_PACIA1716 UNSPEC_AUTIA1716
2920                                   UNSPEC_PACIB1716 UNSPEC_AUTIB1716])
2922 (define_int_iterator VQDMULH [UNSPEC_SQDMULH UNSPEC_SQRDMULH])
2924 (define_int_iterator MULHRS [UNSPEC_SMULHS UNSPEC_UMULHS
2925                              UNSPEC_SMULHRS UNSPEC_UMULHRS])
2927 (define_int_iterator USSUQADD [UNSPEC_SUQADD UNSPEC_USQADD])
2929 (define_int_iterator VSHL [UNSPEC_SSHL UNSPEC_USHL
2930                            UNSPEC_SRSHL UNSPEC_URSHL])
2932 (define_int_iterator VSHLL [UNSPEC_SSHLL UNSPEC_USHLL])
2934 (define_int_iterator VQSHL [UNSPEC_SQSHL UNSPEC_UQSHL
2935                             UNSPEC_SQRSHL UNSPEC_UQRSHL])
2937 (define_int_iterator VSRA [UNSPEC_SSRA UNSPEC_USRA])
2939 (define_int_iterator VSLRI [UNSPEC_SSLI UNSPEC_USLI
2940                               UNSPEC_SSRI UNSPEC_USRI])
2943 (define_int_iterator VRSHR_N [UNSPEC_SRSHR UNSPEC_URSHR])
2945 (define_int_iterator VQSHL_N [UNSPEC_SQSHLU UNSPEC_SQSHL UNSPEC_UQSHL])
2947 (define_int_iterator SQRDMLH_AS [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH])
2949 (define_int_iterator PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2
2950                               UNSPEC_TRN1 UNSPEC_TRN2
2951                               UNSPEC_UZP1 UNSPEC_UZP2])
2953 (define_int_iterator PERMUTEQ [UNSPEC_ZIP1Q UNSPEC_ZIP2Q
2954                                UNSPEC_TRN1Q UNSPEC_TRN2Q
2955                                UNSPEC_UZP1Q UNSPEC_UZP2Q])
2957 (define_int_iterator OPTAB_PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2
2958                                     UNSPEC_UZP1 UNSPEC_UZP2])
2960 (define_int_iterator REVERSE [UNSPEC_REV64 UNSPEC_REV32 UNSPEC_REV16])
2962 (define_int_iterator FRINT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
2963                              UNSPEC_FRINTN UNSPEC_FRINTI UNSPEC_FRINTX
2964                              UNSPEC_FRINTA])
2966 (define_int_iterator FCVT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
2967                             UNSPEC_FRINTA UNSPEC_FRINTN])
2969 (define_int_iterator FCVT_F2FIXED [UNSPEC_FCVTZS UNSPEC_FCVTZU])
2970 (define_int_iterator FCVT_FIXED2F [UNSPEC_SCVTF UNSPEC_UCVTF])
2972 (define_int_iterator CRC [UNSPEC_CRC32B UNSPEC_CRC32H UNSPEC_CRC32W
2973                           UNSPEC_CRC32X UNSPEC_CRC32CB UNSPEC_CRC32CH
2974                           UNSPEC_CRC32CW UNSPEC_CRC32CX])
2976 (define_int_iterator CRYPTO_AES [UNSPEC_AESE UNSPEC_AESD])
2977 (define_int_iterator CRYPTO_AESMC [UNSPEC_AESMC UNSPEC_AESIMC])
2979 (define_int_iterator CRYPTO_SHA1 [UNSPEC_SHA1C UNSPEC_SHA1M UNSPEC_SHA1P])
2981 (define_int_iterator CRYPTO_SHA256 [UNSPEC_SHA256H UNSPEC_SHA256H2])
2983 (define_int_iterator CRYPTO_SHA512 [UNSPEC_SHA512H UNSPEC_SHA512H2])
2985 (define_int_iterator CRYPTO_SM3TT [UNSPEC_SM3TT1A UNSPEC_SM3TT1B
2986                                    UNSPEC_SM3TT2A UNSPEC_SM3TT2B])
2988 (define_int_iterator CRYPTO_SM3PART [UNSPEC_SM3PARTW1 UNSPEC_SM3PARTW2])
2990 ;; Iterators for fp16 operations
2992 (define_int_iterator VFMLA16_LOW [UNSPEC_FMLAL UNSPEC_FMLSL])
2994 (define_int_iterator VFMLA16_HIGH [UNSPEC_FMLAL2 UNSPEC_FMLSL2])
2996 (define_int_iterator UNPACK [UNSPEC_UNPACKSHI UNSPEC_UNPACKUHI
2997                              UNSPEC_UNPACKSLO UNSPEC_UNPACKULO])
2999 (define_int_iterator UNPACK_UNSIGNED [UNSPEC_UNPACKULO UNSPEC_UNPACKUHI])
3001 (define_int_iterator MUL_HIGHPART [UNSPEC_SMUL_HIGHPART UNSPEC_UMUL_HIGHPART])
3003 (define_int_iterator CLAST [UNSPEC_CLASTA UNSPEC_CLASTB])
3005 (define_int_iterator LAST [UNSPEC_LASTA UNSPEC_LASTB])
3007 (define_int_iterator SVE_INT_UNARY [UNSPEC_REVB
3008                                     UNSPEC_REVH UNSPEC_REVW])
3010 (define_int_iterator SVE_FP_UNARY [UNSPEC_FRECPE UNSPEC_RSQRTE])
3012 (define_int_iterator SVE_FP_UNARY_INT [(UNSPEC_FEXPA "TARGET_NON_STREAMING")])
3014 (define_int_iterator SVE_INT_SHIFT_IMM [UNSPEC_ASRD
3015                                         (UNSPEC_SQSHLU "TARGET_SVE2")
3016                                         (UNSPEC_SRSHR "TARGET_SVE2")
3017                                         (UNSPEC_URSHR "TARGET_SVE2")])
3019 (define_int_iterator SVE_INT_BINARY_MULTI [UNSPEC_SQDMULH
3020                                            UNSPEC_SRSHL UNSPEC_URSHL])
3022 (define_int_iterator SVE_FP_BINARY [UNSPEC_FRECPS UNSPEC_RSQRTS])
3024 (define_int_iterator SVE_FP_BINARY_INT [UNSPEC_FTSMUL UNSPEC_FTSSEL])
3026 (define_int_iterator SVE_FP_BINARY_MULTI [UNSPEC_FMAX UNSPEC_FMAXNM
3027                                           UNSPEC_FMIN UNSPEC_FMINNM])
3029 (define_int_iterator SVE_BFLOAT_TERNARY_LONG
3030   [UNSPEC_BFDOT
3031    UNSPEC_BFMLALB
3032    UNSPEC_BFMLALT
3033    (UNSPEC_BFMLSLB "TARGET_SME2 && TARGET_STREAMING_SME")
3034    (UNSPEC_BFMLSLT "TARGET_SME2 && TARGET_STREAMING_SME")
3035    (UNSPEC_BFMMLA "TARGET_NON_STREAMING")])
3037 (define_int_iterator SVE_BFLOAT_TERNARY_LONG_LANE
3038   [UNSPEC_BFDOT
3039    UNSPEC_BFMLALB
3040    UNSPEC_BFMLALT
3041    (UNSPEC_BFMLSLB "TARGET_SME2 && TARGET_STREAMING_SME")
3042    (UNSPEC_BFMLSLT "TARGET_SME2 && TARGET_STREAMING_SME")])
3044 (define_int_iterator SVE_INT_REDUCTION [UNSPEC_ANDV
3045                                         UNSPEC_IORV
3046                                         UNSPEC_SMAXV
3047                                         UNSPEC_SMINV
3048                                         UNSPEC_UMAXV
3049                                         UNSPEC_UMINV
3050                                         UNSPEC_XORV])
3052 (define_int_iterator SVE_FP_REDUCTION [UNSPEC_FADDV
3053                                        UNSPEC_FMAXV
3054                                        UNSPEC_FMAXNMV
3055                                        UNSPEC_FMINV
3056                                        UNSPEC_FMINNMV])
3058 (define_int_iterator SVE_COND_FP_UNARY [UNSPEC_COND_FABS
3059                                         UNSPEC_COND_FNEG
3060                                         UNSPEC_COND_FRECPX
3061                                         UNSPEC_COND_FRINTA
3062                                         UNSPEC_COND_FRINTI
3063                                         UNSPEC_COND_FRINTM
3064                                         UNSPEC_COND_FRINTN
3065                                         UNSPEC_COND_FRINTP
3066                                         UNSPEC_COND_FRINTX
3067                                         UNSPEC_COND_FRINTZ
3068                                         UNSPEC_COND_FSQRT])
3070 ;; Same as SVE_COND_FP_UNARY, but without codes that have a dedicated
3071 ;; <optab><mode>2 expander.
3072 (define_int_iterator SVE_COND_FP_UNARY_OPTAB [UNSPEC_COND_FABS
3073                                               UNSPEC_COND_FNEG
3074                                               UNSPEC_COND_FRECPX
3075                                               UNSPEC_COND_FRINTA
3076                                               UNSPEC_COND_FRINTI
3077                                               UNSPEC_COND_FRINTM
3078                                               UNSPEC_COND_FRINTN
3079                                               UNSPEC_COND_FRINTP
3080                                               UNSPEC_COND_FRINTX
3081                                               UNSPEC_COND_FRINTZ])
3083 (define_int_iterator SVE_COND_FCVT [UNSPEC_COND_FCVT])
3084 (define_int_iterator SVE_COND_FCVTI [UNSPEC_COND_FCVTZS UNSPEC_COND_FCVTZU])
3085 (define_int_iterator SVE_COND_ICVTF [UNSPEC_COND_SCVTF UNSPEC_COND_UCVTF])
3087 (define_int_iterator SVE_COND_FP_BINARY
3088   [UNSPEC_COND_FADD
3089    (UNSPEC_COND_FAMAX "TARGET_SVE_FAMINMAX")
3090    (UNSPEC_COND_FAMIN "TARGET_SVE_FAMINMAX")
3091    UNSPEC_COND_FDIV
3092    UNSPEC_COND_FMAX
3093    UNSPEC_COND_FMAXNM
3094    UNSPEC_COND_FMIN
3095    UNSPEC_COND_FMINNM
3096    UNSPEC_COND_FMUL
3097    UNSPEC_COND_FMULX
3098    UNSPEC_COND_FSUB
3099    UNSPEC_COND_SMAX
3100    UNSPEC_COND_SMIN])
3102 ;; Same as SVE_COND_FP_BINARY, but without codes that have a dedicated
3103 ;; <optab><mode>3 expander.
3104 (define_int_iterator SVE_COND_FP_BINARY_OPTAB [UNSPEC_COND_FADD
3105                                                UNSPEC_COND_FMAX
3106                                                UNSPEC_COND_FMAXNM
3107                                                UNSPEC_COND_FMIN
3108                                                UNSPEC_COND_FMINNM
3109                                                UNSPEC_COND_FMUL
3110                                                UNSPEC_COND_FMULX
3111                                                UNSPEC_COND_FSUB
3112                                                UNSPEC_COND_SMAX
3113                                                UNSPEC_COND_SMIN])
3115 (define_int_iterator SVE_COND_FP_BINARY_INT [UNSPEC_COND_FSCALE])
3117 (define_int_iterator SVE_COND_FP_ADD [UNSPEC_COND_FADD])
3118 (define_int_iterator SVE_COND_FP_SUB [UNSPEC_COND_FSUB])
3119 (define_int_iterator SVE_COND_FP_MUL [UNSPEC_COND_FMUL])
3121 (define_int_iterator SVE_COND_FP_BINARY_I1 [UNSPEC_COND_FMAX
3122                                             UNSPEC_COND_FMAXNM
3123                                             UNSPEC_COND_FMIN
3124                                             UNSPEC_COND_FMINNM
3125                                             UNSPEC_COND_FMUL
3126                                             UNSPEC_COND_SMAX
3127                                             UNSPEC_COND_SMIN])
3129 (define_int_iterator SVE_COND_FP_BINARY_REG
3130   [(UNSPEC_COND_FAMAX "TARGET_SVE_FAMINMAX")
3131    (UNSPEC_COND_FAMIN "TARGET_SVE_FAMINMAX")
3132    UNSPEC_COND_FDIV
3133    UNSPEC_COND_FMULX])
3135 (define_int_iterator SVE_COND_FCADD [UNSPEC_COND_FCADD90
3136                                      UNSPEC_COND_FCADD270])
3138 (define_int_iterator SVE_COND_FP_MAXMIN [UNSPEC_COND_FMAX
3139                                          UNSPEC_COND_FMAXNM
3140                                          UNSPEC_COND_FMIN
3141                                          UNSPEC_COND_FMINNM
3142                                          UNSPEC_COND_SMAX
3143                                          UNSPEC_COND_SMIN])
3145 (define_int_iterator SVE_COND_SMAXMIN [UNSPEC_COND_SMAX
3146                                        UNSPEC_COND_SMIN])
3148 (define_int_iterator SVE_COND_FP_TERNARY [UNSPEC_COND_FMLA
3149                                           UNSPEC_COND_FMLS
3150                                           UNSPEC_COND_FNMLA
3151                                           UNSPEC_COND_FNMLS])
3153 (define_int_iterator SVE_COND_FCMLA [UNSPEC_COND_FCMLA
3154                                      UNSPEC_COND_FCMLA90
3155                                      UNSPEC_COND_FCMLA180
3156                                      UNSPEC_COND_FCMLA270])
3158 (define_int_iterator SVE_COND_INT_CMP_WIDE [UNSPEC_COND_CMPEQ_WIDE
3159                                             UNSPEC_COND_CMPGE_WIDE
3160                                             UNSPEC_COND_CMPGT_WIDE
3161                                             UNSPEC_COND_CMPHI_WIDE
3162                                             UNSPEC_COND_CMPHS_WIDE
3163                                             UNSPEC_COND_CMPLE_WIDE
3164                                             UNSPEC_COND_CMPLO_WIDE
3165                                             UNSPEC_COND_CMPLS_WIDE
3166                                             UNSPEC_COND_CMPLT_WIDE
3167                                             UNSPEC_COND_CMPNE_WIDE])
3169 ;; SVE FP comparisons that accept #0.0.
3170 (define_int_iterator SVE_COND_FP_CMP_I0 [UNSPEC_COND_FCMEQ
3171                                          UNSPEC_COND_FCMGE
3172                                          UNSPEC_COND_FCMGT
3173                                          UNSPEC_COND_FCMLE
3174                                          UNSPEC_COND_FCMLT
3175                                          UNSPEC_COND_FCMNE])
3177 (define_int_iterator SVE_COND_FP_ABS_CMP [UNSPEC_COND_FCMGE
3178                                           UNSPEC_COND_FCMGT
3179                                           UNSPEC_COND_FCMLE
3180                                           UNSPEC_COND_FCMLT])
3182 (define_int_iterator SVE_FP_TERNARY_LANE [UNSPEC_FMLA UNSPEC_FMLS])
3184 (define_int_iterator SVE_CFP_TERNARY_LANE [UNSPEC_FCMLA UNSPEC_FCMLA90
3185                                            UNSPEC_FCMLA180 UNSPEC_FCMLA270])
3187 (define_int_iterator SVE_WHILE [UNSPEC_WHILELE UNSPEC_WHILELO
3188                                 UNSPEC_WHILELS UNSPEC_WHILELT
3189                                 (UNSPEC_WHILEGE "TARGET_SVE2")
3190                                 (UNSPEC_WHILEGT "TARGET_SVE2")
3191                                 (UNSPEC_WHILEHI "TARGET_SVE2")
3192                                 (UNSPEC_WHILEHS "TARGET_SVE2")
3193                                 (UNSPEC_WHILERW "TARGET_SVE2")
3194                                 (UNSPEC_WHILEWR "TARGET_SVE2")])
3196 (define_int_iterator SVE2_WHILE_PTR [UNSPEC_WHILERW UNSPEC_WHILEWR])
3198 (define_int_iterator SVE_WHILE_ORDER [UNSPEC_WHILEGE UNSPEC_WHILEGT
3199                                       UNSPEC_WHILEHI UNSPEC_WHILEHS
3200                                       UNSPEC_WHILELE UNSPEC_WHILELO
3201                                       UNSPEC_WHILELS UNSPEC_WHILELT])
3203 (define_int_iterator SVE_SHIFT_WIDE [UNSPEC_ASHIFT_WIDE
3204                                      UNSPEC_ASHIFTRT_WIDE
3205                                      UNSPEC_LSHIFTRT_WIDE])
3207 (define_int_iterator SVE_LDFF1_LDNF1 [UNSPEC_LDFF1 UNSPEC_LDNF1])
3209 (define_int_iterator SVE_PRED_LOAD [UNSPEC_PRED_X UNSPEC_LD1_SVE])
3211 (define_int_attr pred_load [(UNSPEC_PRED_X "_x") (UNSPEC_LD1_SVE "")])
3213 (define_int_iterator LD1_COUNT [UNSPEC_LD1_COUNT UNSPEC_LDNT1_COUNT])
3215 (define_int_iterator ST1_COUNT [UNSPEC_ST1_COUNT UNSPEC_STNT1_COUNT])
3217 (define_int_iterator SVE2_U32_UNARY [UNSPEC_URECPE UNSPEC_RSQRTE])
3219 (define_int_iterator SVE2_INT_UNARY_NARROWB [UNSPEC_SQXTNB
3220                                              UNSPEC_SQXTUNB
3221                                              UNSPEC_UQXTNB])
3223 (define_int_iterator SVE2_INT_UNARY_NARROWT [UNSPEC_SQXTNT
3224                                              UNSPEC_SQXTUNT
3225                                              UNSPEC_UQXTNT])
3227 (define_int_iterator SVE2_INT_BINARY [UNSPEC_SQDMULH
3228                                       UNSPEC_SQRDMULH])
3230 (define_int_iterator SVE2_INT_BINARY_LANE [UNSPEC_SQDMULH
3231                                            UNSPEC_SQRDMULH])
3233 (define_int_iterator SVE2_INT_BINARY_LONG [UNSPEC_SABDLB
3234                                            UNSPEC_SABDLT
3235                                            UNSPEC_SADDLB
3236                                            UNSPEC_SADDLBT
3237                                            UNSPEC_SADDLT
3238                                            UNSPEC_SMULLB
3239                                            UNSPEC_SMULLT
3240                                            UNSPEC_SQDMULLB
3241                                            UNSPEC_SQDMULLT
3242                                            UNSPEC_SSUBLB
3243                                            UNSPEC_SSUBLBT
3244                                            UNSPEC_SSUBLT
3245                                            UNSPEC_SSUBLTB
3246                                            UNSPEC_UABDLB
3247                                            UNSPEC_UABDLT
3248                                            UNSPEC_UADDLB
3249                                            UNSPEC_UADDLT
3250                                            UNSPEC_UMULLB
3251                                            UNSPEC_UMULLT
3252                                            UNSPEC_USUBLB
3253                                            UNSPEC_USUBLT])
3255 (define_int_iterator SVE2_INT_BINARY_LONG_LANE [UNSPEC_SMULLB
3256                                                 UNSPEC_SMULLT
3257                                                 UNSPEC_SQDMULLB
3258                                                 UNSPEC_SQDMULLT
3259                                                 UNSPEC_UMULLB
3260                                                 UNSPEC_UMULLT])
3262 (define_int_iterator SVE2_INT_BINARY_NARROWB [UNSPEC_ADDHNB
3263                                               UNSPEC_RADDHNB
3264                                               UNSPEC_RSUBHNB
3265                                               UNSPEC_SUBHNB])
3267 (define_int_iterator SVE2_INT_BINARY_NARROWT [UNSPEC_ADDHNT
3268                                               UNSPEC_RADDHNT
3269                                               UNSPEC_RSUBHNT
3270                                               UNSPEC_SUBHNT])
3272 (define_int_iterator SVE2_INT_BINARY_PAIR [UNSPEC_ADDP
3273                                            UNSPEC_SMAXP
3274                                            UNSPEC_SMINP
3275                                            UNSPEC_UMAXP
3276                                            UNSPEC_UMINP])
3278 (define_int_iterator SVE2_FP_BINARY_PAIR [UNSPEC_FADDP
3279                                           UNSPEC_FMAXP
3280                                           UNSPEC_FMAXNMP
3281                                           UNSPEC_FMINP
3282                                           UNSPEC_FMINNMP])
3284 (define_int_iterator SVE2_INT_BINARY_PAIR_LONG [UNSPEC_SADALP UNSPEC_UADALP])
3286 (define_int_iterator SVE2_INT_BINARY_WIDE [UNSPEC_SADDWB
3287                                            UNSPEC_SADDWT
3288                                            UNSPEC_SSUBWB
3289                                            UNSPEC_SSUBWT
3290                                            UNSPEC_UADDWB
3291                                            UNSPEC_UADDWT
3292                                            UNSPEC_USUBWB
3293                                            UNSPEC_USUBWT])
3295 (define_int_iterator SVE2_INT_SHIFT_IMM_LONG [UNSPEC_SSHLLB
3296                                               UNSPEC_SSHLLT
3297                                               UNSPEC_USHLLB
3298                                               UNSPEC_USHLLT])
3300 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWB [UNSPEC_RSHRNB
3301                                                  UNSPEC_SHRNB
3302                                                  UNSPEC_SQRSHRNB
3303                                                  UNSPEC_SQRSHRUNB
3304                                                  UNSPEC_SQSHRNB
3305                                                  UNSPEC_SQSHRUNB
3306                                                  UNSPEC_UQRSHRNB
3307                                                  UNSPEC_UQSHRNB])
3309 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWT [UNSPEC_RSHRNT
3310                                                  UNSPEC_SHRNT
3311                                                  UNSPEC_SQRSHRNT
3312                                                  UNSPEC_SQRSHRUNT
3313                                                  UNSPEC_SQSHRNT
3314                                                  UNSPEC_SQSHRUNT
3315                                                  UNSPEC_UQRSHRNT
3316                                                  UNSPEC_UQSHRNT])
3318 (define_int_iterator SVE2_INT_SHIFT_IMM_NARROWxN [UNSPEC_SQRSHR
3319                                                   UNSPEC_SQRSHRN
3320                                                   UNSPEC_SQRSHRU
3321                                                   UNSPEC_SQRSHRUN
3322                                                   UNSPEC_UQRSHR
3323                                                   UNSPEC_UQRSHRN])
3325 (define_int_iterator SVE2_INT_SHIFT_INSERT [UNSPEC_SLI UNSPEC_SRI])
3327 (define_int_iterator SVE2_INT_CADD [UNSPEC_CADD90
3328                                     UNSPEC_CADD270
3329                                     UNSPEC_SQCADD90
3330                                     UNSPEC_SQCADD270])
3332 (define_int_iterator SVE2_INT_BITPERM [UNSPEC_BDEP UNSPEC_BEXT UNSPEC_BGRP])
3334 (define_int_iterator SVE2_INT_TERNARY [UNSPEC_ADCLB
3335                                        UNSPEC_ADCLT
3336                                        UNSPEC_EORBT
3337                                        UNSPEC_EORTB
3338                                        UNSPEC_SBCLB
3339                                        UNSPEC_SBCLT
3340                                        UNSPEC_SQRDMLAH
3341                                        UNSPEC_SQRDMLSH])
3343 (define_int_iterator SVE2_INT_TERNARY_LANE [UNSPEC_SQRDMLAH
3344                                             UNSPEC_SQRDMLSH])
3346 (define_int_iterator SVE2_FP_TERNARY_LONG [UNSPEC_FMLALB
3347                                            UNSPEC_FMLALT
3348                                            UNSPEC_FMLSLB
3349                                            UNSPEC_FMLSLT])
3351 (define_int_iterator SVE2_FP_TERNARY_LONG_LANE [UNSPEC_FMLALB
3352                                                 UNSPEC_FMLALT
3353                                                 UNSPEC_FMLSLB
3354                                                 UNSPEC_FMLSLT])
3356 (define_int_iterator SVE2_INT_CMLA [UNSPEC_CMLA
3357                                     UNSPEC_CMLA90
3358                                     UNSPEC_CMLA180
3359                                     UNSPEC_CMLA270
3360                                     UNSPEC_SQRDCMLAH
3361                                     UNSPEC_SQRDCMLAH90
3362                                     UNSPEC_SQRDCMLAH180
3363                                     UNSPEC_SQRDCMLAH270])
3365 ;; Unlike the normal CMLA instructions these represent the actual operation
3366 ;; to be performed.  They will always need to be expanded into multiple
3367 ;; sequences consisting of CMLA.
3368 (define_int_iterator SVE2_INT_CMLA_OP [UNSPEC_CMLA
3369                                        UNSPEC_CMLA_CONJ
3370                                        UNSPEC_CMLA180
3371                                        UNSPEC_CMLA180_CONJ])
3373 ;; Unlike the normal CMLA instructions these represent the actual operation
3374 ;; to be performed.  They will always need to be expanded into multiple
3375 ;; sequences consisting of CMLA.
3376 (define_int_iterator SVE2_INT_CMUL_OP [UNSPEC_CMUL
3377                                        UNSPEC_CMUL_CONJ])
3379 ;; Same as SVE2_INT_CADD but exclude the saturating instructions
3380 (define_int_iterator SVE2_INT_CADD_OP [UNSPEC_CADD90
3381                                        UNSPEC_CADD270])
3383 (define_int_iterator SVE2_INT_CDOT [UNSPEC_CDOT
3384                                     UNSPEC_CDOT90
3385                                     UNSPEC_CDOT180
3386                                     UNSPEC_CDOT270])
3388 (define_int_iterator SVE2_INT_ADD_BINARY_LONG [UNSPEC_SABDLB
3389                                                UNSPEC_SABDLT
3390                                                UNSPEC_SMULLB
3391                                                UNSPEC_SMULLT
3392                                                UNSPEC_UABDLB
3393                                                UNSPEC_UABDLT
3394                                                UNSPEC_UMULLB
3395                                                UNSPEC_UMULLT])
3397 (define_int_iterator SVE2_INT_QADD_BINARY_LONG [UNSPEC_SQDMULLB
3398                                                 UNSPEC_SQDMULLBT
3399                                                 UNSPEC_SQDMULLT])
3401 (define_int_iterator SVE2_INT_SUB_BINARY_LONG [UNSPEC_SMULLB
3402                                                UNSPEC_SMULLT
3403                                                UNSPEC_UMULLB
3404                                                UNSPEC_UMULLT])
3406 (define_int_iterator SVE2_INT_QSUB_BINARY_LONG [UNSPEC_SQDMULLB
3407                                                 UNSPEC_SQDMULLBT
3408                                                 UNSPEC_SQDMULLT])
3410 (define_int_iterator SVE2_INT_ADD_BINARY_LONG_LANE [UNSPEC_SMULLB
3411                                                     UNSPEC_SMULLT
3412                                                     UNSPEC_UMULLB
3413                                                     UNSPEC_UMULLT])
3415 (define_int_iterator SVE2_INT_QADD_BINARY_LONG_LANE [UNSPEC_SQDMULLB
3416                                                      UNSPEC_SQDMULLT])
3418 (define_int_iterator SVE2_INT_SUB_BINARY_LONG_LANE [UNSPEC_SMULLB
3419                                                     UNSPEC_SMULLT
3420                                                     UNSPEC_UMULLB
3421                                                     UNSPEC_UMULLT])
3423 (define_int_iterator SVE2_INT_QSUB_BINARY_LONG_LANE [UNSPEC_SQDMULLB
3424                                                      UNSPEC_SQDMULLT])
3426 (define_int_iterator SVE2_COND_INT_UNARY_FP [UNSPEC_COND_FLOGB])
3428 (define_int_iterator SVE2_COND_FP_UNARY_LONG [UNSPEC_COND_FCVTLT])
3430 (define_int_iterator SVE2_COND_FP_UNARY_NARROWB [UNSPEC_COND_FCVTX])
3432 (define_int_iterator SVE2_COND_INT_BINARY [UNSPEC_SHADD
3433                                            UNSPEC_SHSUB
3434                                            UNSPEC_SQRSHL
3435                                            UNSPEC_SRHADD
3436                                            UNSPEC_SRSHL
3437                                            UNSPEC_SUQADD
3438                                            UNSPEC_UHADD
3439                                            UNSPEC_UHSUB
3440                                            UNSPEC_UQRSHL
3441                                            UNSPEC_URHADD
3442                                            UNSPEC_URSHL
3443                                            UNSPEC_USQADD])
3445 (define_int_iterator SVE2_COND_INT_BINARY_NOREV [UNSPEC_SUQADD
3446                                                  UNSPEC_USQADD])
3448 (define_int_iterator SVE2_COND_INT_BINARY_REV [UNSPEC_SHADD
3449                                                UNSPEC_SHSUB
3450                                                UNSPEC_SQRSHL
3451                                                UNSPEC_SRHADD
3452                                                UNSPEC_SRSHL
3453                                                UNSPEC_UHADD
3454                                                UNSPEC_UHSUB
3455                                                UNSPEC_UQRSHL
3456                                                UNSPEC_URHADD
3457                                                UNSPEC_URSHL])
3459 (define_int_iterator SVE2_COND_INT_SHIFT [UNSPEC_SQSHL
3460                                           UNSPEC_UQSHL])
3462 (define_int_iterator SVE2_MATCH [UNSPEC_MATCH UNSPEC_NMATCH])
3464 (define_int_iterator SVE2_PMULL [UNSPEC_PMULLB UNSPEC_PMULLT])
3466 (define_int_iterator SVE2_PMULL_PAIR [UNSPEC_PMULLB_PAIR UNSPEC_PMULLT_PAIR])
3468 (define_int_iterator SVE_QCVTxN [UNSPEC_SQCVT UNSPEC_SQCVTN
3469                                  UNSPEC_SQCVTU UNSPEC_SQCVTUN
3470                                  UNSPEC_UQCVT UNSPEC_UQCVTN])
3472 (define_int_iterator SVE2_SFx24_UNARY [UNSPEC_FRINTA UNSPEC_FRINTM
3473                                        UNSPEC_FRINTN UNSPEC_FRINTP])
3475 (define_int_iterator SVE2_x24_PERMUTE [UNSPEC_ZIP UNSPEC_UZP])
3476 (define_int_iterator SVE2_x24_PERMUTEQ [UNSPEC_ZIPQ UNSPEC_UZPQ])
3478 (define_int_iterator FCADD [UNSPEC_FCADD90
3479                             UNSPEC_FCADD270])
3481 (define_int_iterator FCMLA [UNSPEC_FCMLA
3482                             UNSPEC_FCMLA90
3483                             UNSPEC_FCMLA180
3484                             UNSPEC_FCMLA270])
3486 (define_int_iterator FRINTNZX [UNSPEC_FRINT32Z UNSPEC_FRINT32X
3487                                UNSPEC_FRINT64Z UNSPEC_FRINT64X])
3489 (define_int_iterator SVE_BRK_UNARY [UNSPEC_BRKA UNSPEC_BRKB])
3491 (define_int_iterator SVE_BRKP [UNSPEC_BRKPA UNSPEC_BRKPB])
3493 (define_int_iterator SVE_BRK_BINARY [UNSPEC_BRKN UNSPEC_BRKPA UNSPEC_BRKPB])
3495 (define_int_iterator SVE_PITER [UNSPEC_PFIRST UNSPEC_PNEXT])
3497 (define_int_iterator MATMUL [UNSPEC_SMATMUL UNSPEC_UMATMUL
3498                              UNSPEC_USMATMUL])
3500 (define_int_iterator FMMLA [UNSPEC_FMMLA])
3502 (define_int_iterator BF_MLA [UNSPEC_BFMLALB
3503                              UNSPEC_BFMLALT])
3505 (define_int_iterator FCMLA_OP [UNSPEC_FCMLA
3506                                UNSPEC_FCMLA180
3507                                UNSPEC_FCMLA_CONJ
3508                                UNSPEC_FCMLA180_CONJ])
3510 (define_int_iterator FCMUL_OP [UNSPEC_FCMUL
3511                                UNSPEC_FCMUL_CONJ])
3513 (define_int_iterator UNSPEC_REVD_ONLY [UNSPEC_REVD])
3515 (define_int_iterator SME_LD1 [UNSPEC_SME_LD1_HOR UNSPEC_SME_LD1_VER])
3516 (define_int_iterator SME_READ [UNSPEC_SME_READ_HOR UNSPEC_SME_READ_VER])
3517 (define_int_iterator SME_ST1 [UNSPEC_SME_ST1_HOR UNSPEC_SME_ST1_VER])
3518 (define_int_iterator SME_WRITE [UNSPEC_SME_WRITE_HOR UNSPEC_SME_WRITE_VER])
3520 (define_int_iterator SME_BINARY_SDI [UNSPEC_SME_ADDHA UNSPEC_SME_ADDVA])
3522 (define_int_iterator SME_INT_MOP [UNSPEC_SME_SMOPA UNSPEC_SME_SMOPS
3523                                   UNSPEC_SME_SUMOPA UNSPEC_SME_SUMOPS
3524                                   UNSPEC_SME_UMOPA UNSPEC_SME_UMOPS
3525                                   UNSPEC_SME_USMOPA UNSPEC_SME_USMOPS])
3527 (define_int_iterator SME2_INT_MOP [UNSPEC_SME_SMOPA UNSPEC_SME_SMOPS
3528                                    UNSPEC_SME_UMOPA UNSPEC_SME_UMOPS])
3530 (define_int_iterator SME_FP_MOP [UNSPEC_SME_FMOPA UNSPEC_SME_FMOPS])
3532 (define_int_iterator SME2_BMOP [UNSPEC_SME_BMOPA UNSPEC_SME_BMOPS])
3534 (define_int_iterator SME_BINARY_SLICE_SDI [UNSPEC_SME_ADD UNSPEC_SME_SUB])
3536 (define_int_iterator SME_BINARY_SLICE_SDF [UNSPEC_SME_FADD UNSPEC_SME_FSUB])
3538 (define_int_iterator SME_BINARY_WRITE_SLICE_SDI [UNSPEC_SME_ADD_WRITE
3539                                                  UNSPEC_SME_SUB_WRITE])
3541 (define_int_iterator SME_INT_DOTPROD [UNSPEC_SME_SDOT UNSPEC_SME_UDOT
3542                                       UNSPEC_SME_USDOT])
3544 (define_int_iterator SME_INT_DOTPROD_LANE [UNSPEC_SME_SDOT UNSPEC_SME_SVDOT
3545                                            UNSPEC_SME_UDOT UNSPEC_SME_UVDOT
3546                                            UNSPEC_SME_SUDOT UNSPEC_SME_SUVDOT
3547                                            UNSPEC_SME_USDOT UNSPEC_SME_USVDOT])
3549 (define_int_iterator SME_FP_DOTPROD [UNSPEC_SME_FDOT])
3551 (define_int_iterator SME_FP_DOTPROD_LANE [UNSPEC_SME_FDOT UNSPEC_SME_FVDOT])
3553 (define_int_iterator SME_INT_TERNARY_SLICE [UNSPEC_SME_SMLA UNSPEC_SME_SMLS
3554                                             UNSPEC_SME_UMLA UNSPEC_SME_UMLS])
3556 (define_int_iterator SME_FP_TERNARY_SLICE [UNSPEC_SME_FMLA UNSPEC_SME_FMLS])
3558 ;; Iterators for atomic operations.
3560 (define_int_iterator ATOMIC_LDOP
3561  [UNSPECV_ATOMIC_LDOP_OR UNSPECV_ATOMIC_LDOP_BIC
3562   UNSPECV_ATOMIC_LDOP_XOR UNSPECV_ATOMIC_LDOP_PLUS])
3564 (define_int_attr atomic_ldop
3565  [(UNSPECV_ATOMIC_LDOP_OR "set") (UNSPECV_ATOMIC_LDOP_BIC "clr")
3566   (UNSPECV_ATOMIC_LDOP_XOR "eor") (UNSPECV_ATOMIC_LDOP_PLUS "add")])
3568 (define_int_attr atomic_ldoptab
3569  [(UNSPECV_ATOMIC_LDOP_OR "ior") (UNSPECV_ATOMIC_LDOP_BIC "bic")
3570   (UNSPECV_ATOMIC_LDOP_XOR "xor") (UNSPECV_ATOMIC_LDOP_PLUS "add")])
3572 (define_int_iterator SUBDI_BITS [8 16 32])
3574 (define_int_iterator BHSD_BITS [8 16 32 64])
3576 (define_int_iterator LUTI_BITS [2 4])
3578 ;; -------------------------------------------------------------------
3579 ;; Int Iterators Attributes.
3580 ;; -------------------------------------------------------------------
3582 ;; The optab associated with an operation.  Note that for ANDF, IORF
3583 ;; and XORF, the optab pattern is not actually defined; we just use this
3584 ;; name for consistency with the integer patterns.
3585 (define_int_attr optab [(UNSPEC_ANDF "and")
3586                         (UNSPEC_IORF "ior")
3587                         (UNSPEC_XORF "xor")
3588                         (UNSPEC_SADDV "sadd")
3589                         (UNSPEC_UADDV "uadd")
3590                         (UNSPEC_ANDV "and")
3591                         (UNSPEC_IORV "ior")
3592                         (UNSPEC_XORV "xor")
3593                         (UNSPEC_FRECPE "frecpe")
3594                         (UNSPEC_FRECPS "frecps")
3595                         (UNSPEC_RSQRTE "frsqrte")
3596                         (UNSPEC_RSQRTS "frsqrts")
3597                         (UNSPEC_REVB "revb")
3598                         (UNSPEC_REVD "revd")
3599                         (UNSPEC_REVH "revh")
3600                         (UNSPEC_REVW "revw")
3601                         (UNSPEC_UMAXV "umax")
3602                         (UNSPEC_UMINV "umin")
3603                         (UNSPEC_SMAXV "smax")
3604                         (UNSPEC_SMINV "smin")
3605                         (UNSPEC_CADD90 "cadd90")
3606                         (UNSPEC_CADD270 "cadd270")
3607                         (UNSPEC_CDOT "cdot")
3608                         (UNSPEC_CDOT90 "cdot90")
3609                         (UNSPEC_CDOT180 "cdot180")
3610                         (UNSPEC_CDOT270 "cdot270")
3611                         (UNSPEC_CMLA "cmla")
3612                         (UNSPEC_CMLA90 "cmla90")
3613                         (UNSPEC_CMLA180 "cmla180")
3614                         (UNSPEC_CMLA270 "cmla270")
3615                         (UNSPEC_FADDV "plus")
3616                         (UNSPEC_FMAXNMV "smax")
3617                         (UNSPEC_FMAXV "smax_nan")
3618                         (UNSPEC_FMINNMV "smin")
3619                         (UNSPEC_FMINV "smin_nan")
3620                         (UNSPEC_SMUL_HIGHPART "smulh")
3621                         (UNSPEC_UMUL_HIGHPART "umulh")
3622                         (UNSPEC_FMLA "fma")
3623                         (UNSPEC_FMLS "fnma")
3624                         (UNSPEC_FCMLA "fcmla")
3625                         (UNSPEC_FCMLA90 "fcmla90")
3626                         (UNSPEC_FCMLA180 "fcmla180")
3627                         (UNSPEC_FCMLA270 "fcmla270")
3628                         (UNSPEC_FEXPA "fexpa")
3629                         (UNSPEC_FTSMUL "ftsmul")
3630                         (UNSPEC_FTSSEL "ftssel")
3631                         (UNSPEC_LD1_COUNT "ld1")
3632                         (UNSPEC_LDNT1_COUNT "ldnt1")
3633                         (UNSPEC_PMULLB "pmullb")
3634                         (UNSPEC_PMULLB_PAIR "pmullb_pair")
3635                         (UNSPEC_PMULLT "pmullt")
3636                         (UNSPEC_PMULLT_PAIR "pmullt_pair")
3637                         (UNSPEC_SMATMUL "smatmul")
3638                         (UNSPEC_UZP "uzp")
3639                         (UNSPEC_UZPQ "uzpq")
3640                         (UNSPEC_ZIP "zip")
3641                         (UNSPEC_ZIPQ "zipq")
3642                         (UNSPEC_SME_ADD "add")
3643                         (UNSPEC_SME_ADD_WRITE "add_write")
3644                         (UNSPEC_SME_ADDHA "addha")
3645                         (UNSPEC_SME_ADDVA "addva")
3646                         (UNSPEC_SME_BMOPA "bmopa")
3647                         (UNSPEC_SME_BMOPS "bmops")
3648                         (UNSPEC_SME_FADD "fadd")
3649                         (UNSPEC_SME_FDOT "fdot")
3650                         (UNSPEC_SME_FVDOT "fvdot")
3651                         (UNSPEC_SME_FMLA "fmla")
3652                         (UNSPEC_SME_FMLS "fmls")
3653                         (UNSPEC_SME_FMOPA "fmopa")
3654                         (UNSPEC_SME_FMOPS "fmops")
3655                         (UNSPEC_SME_FSUB "fsub")
3656                         (UNSPEC_SME_LD1_HOR "ld1_hor")
3657                         (UNSPEC_SME_LD1_VER "ld1_ver")
3658                         (UNSPEC_SME_READ_HOR "read_hor")
3659                         (UNSPEC_SME_READ_VER "read_ver")
3660                         (UNSPEC_SME_SDOT "sdot")
3661                         (UNSPEC_SME_SVDOT "svdot")
3662                         (UNSPEC_SME_SMLA "smla")
3663                         (UNSPEC_SME_SMLS "smls")
3664                         (UNSPEC_SME_SMOPA "smopa")
3665                         (UNSPEC_SME_SMOPS "smops")
3666                         (UNSPEC_SME_ST1_HOR "st1_hor")
3667                         (UNSPEC_SME_ST1_VER "st1_ver")
3668                         (UNSPEC_SME_SUB "sub")
3669                         (UNSPEC_SME_SUB_WRITE "sub_write")
3670                         (UNSPEC_SME_SUDOT "sudot")
3671                         (UNSPEC_SME_SUVDOT "suvdot")
3672                         (UNSPEC_SME_SUMOPA "sumopa")
3673                         (UNSPEC_SME_SUMOPS "sumops")
3674                         (UNSPEC_SME_UDOT "udot")
3675                         (UNSPEC_SME_UVDOT "uvdot")
3676                         (UNSPEC_SME_UMLA "umla")
3677                         (UNSPEC_SME_UMLS "umls")
3678                         (UNSPEC_SME_UMOPA "umopa")
3679                         (UNSPEC_SME_UMOPS "umops")
3680                         (UNSPEC_SME_USDOT "usdot")
3681                         (UNSPEC_SME_USVDOT "usvdot")
3682                         (UNSPEC_SME_USMOPA "usmopa")
3683                         (UNSPEC_SME_USMOPS "usmops")
3684                         (UNSPEC_SME_WRITE_HOR "write_hor")
3685                         (UNSPEC_SME_WRITE_VER "write_ver")
3686                         (UNSPEC_SQCADD90 "sqcadd90")
3687                         (UNSPEC_SQCADD270 "sqcadd270")
3688                         (UNSPEC_SQCVT "sqcvt")
3689                         (UNSPEC_SQCVTN "sqcvtn")
3690                         (UNSPEC_SQCVTU "sqcvtu")
3691                         (UNSPEC_SQCVTUN "sqcvtun")
3692                         (UNSPEC_SQRDCMLAH "sqrdcmlah")
3693                         (UNSPEC_SQRDCMLAH90 "sqrdcmlah90")
3694                         (UNSPEC_SQRDCMLAH180 "sqrdcmlah180")
3695                         (UNSPEC_SQRDCMLAH270 "sqrdcmlah270")
3696                         (UNSPEC_ST1_COUNT "st1")
3697                         (UNSPEC_STNT1_COUNT "stnt1")
3698                         (UNSPEC_TRN1Q "trn1q")
3699                         (UNSPEC_TRN2Q "trn2q")
3700                         (UNSPEC_UMATMUL "umatmul")
3701                         (UNSPEC_UQCVT "uqcvt")
3702                         (UNSPEC_UQCVTN "uqcvtn")
3703                         (UNSPEC_USMATMUL "usmatmul")
3704                         (UNSPEC_UZP1Q "uzp1q")
3705                         (UNSPEC_UZP2Q "uzp2q")
3706                         (UNSPEC_WHILERW "vec_check_raw_alias")
3707                         (UNSPEC_WHILEWR "vec_check_war_alias")
3708                         (UNSPEC_ZIP1Q "zip1q")
3709                         (UNSPEC_ZIP2Q "zip2q")
3710                         (UNSPEC_COND_FABS "abs")
3711                         (UNSPEC_COND_FADD "add")
3712                         (UNSPEC_COND_FAMAX "famax")
3713                         (UNSPEC_COND_FAMIN "famin")
3714                         (UNSPEC_COND_FCADD90 "cadd90")
3715                         (UNSPEC_COND_FCADD270 "cadd270")
3716                         (UNSPEC_COND_FCMLA "fcmla")
3717                         (UNSPEC_COND_FCMLA90 "fcmla90")
3718                         (UNSPEC_COND_FCMLA180 "fcmla180")
3719                         (UNSPEC_COND_FCMLA270 "fcmla270")
3720                         (UNSPEC_COND_FCVT "fcvt")
3721                         (UNSPEC_COND_FCVTZS "fix_trunc")
3722                         (UNSPEC_COND_FCVTZU "fixuns_trunc")
3723                         (UNSPEC_COND_FDIV "div")
3724                         (UNSPEC_COND_FMAX "fmax_nan")
3725                         (UNSPEC_COND_FMAXNM "fmax")
3726                         (UNSPEC_COND_FMIN "fmin_nan")
3727                         (UNSPEC_COND_FMINNM "fmin")
3728                         (UNSPEC_COND_FMLA "fma")
3729                         (UNSPEC_COND_FMLS "fnma")
3730                         (UNSPEC_COND_FMUL "mul")
3731                         (UNSPEC_COND_FMULX "mulx")
3732                         (UNSPEC_COND_FNEG "neg")
3733                         (UNSPEC_COND_FNMLA "fnms")
3734                         (UNSPEC_COND_FNMLS "fms")
3735                         (UNSPEC_COND_FRECPX "frecpx")
3736                         (UNSPEC_COND_FRINTA "round")
3737                         (UNSPEC_COND_FRINTI "nearbyint")
3738                         (UNSPEC_COND_FRINTM "floor")
3739                         (UNSPEC_COND_FRINTN "frintn")
3740                         (UNSPEC_COND_FRINTP "ceil")
3741                         (UNSPEC_COND_FRINTX "rint")
3742                         (UNSPEC_COND_FRINTZ "btrunc")
3743                         (UNSPEC_COND_FSCALE "fscale")
3744                         (UNSPEC_COND_FSQRT "sqrt")
3745                         (UNSPEC_COND_FSUB "sub")
3746                         (UNSPEC_COND_SCVTF "float")
3747                         (UNSPEC_COND_SMAX "smax")
3748                         (UNSPEC_COND_SMIN "smin")
3749                         (UNSPEC_COND_UCVTF "floatuns")])
3751 (define_int_attr fmaxmin [(UNSPEC_FMAX "fmax_nan")
3752                           (UNSPEC_FMAXNM "fmax")
3753                           (UNSPEC_FMAXNMV "fmax")
3754                           (UNSPEC_FMIN "fmin_nan")
3755                           (UNSPEC_FMINNM "fmin")
3756                           (UNSPEC_FMINNMV "fmin")])
3758 (define_int_attr  maxmin_uns_op [(UNSPEC_UMAXV "umax")
3759                                  (UNSPEC_UMINV "umin")
3760                                  (UNSPEC_SMAXV "smax")
3761                                  (UNSPEC_SMINV "smin")
3762                                  (UNSPEC_FMAX "fmax")
3763                                  (UNSPEC_FMAXNMV "fmaxnm")
3764                                  (UNSPEC_FMAXV "fmax")
3765                                  (UNSPEC_FMIN "fmin")
3766                                  (UNSPEC_FMINNMV "fminnm")
3767                                  (UNSPEC_FMINV "fmin")
3768                                  (UNSPEC_FMAXNM "fmaxnm")
3769                                  (UNSPEC_FMINNM "fminnm")])
3771 (define_code_attr binqops_op [(ss_plus "sqadd")
3772                               (us_plus "uqadd")
3773                               (ss_minus "sqsub")
3774                               (us_minus "uqsub")])
3776 (define_code_attr binqops_op_rev [(ss_plus "sqsub")
3777                                   (ss_minus "sqadd")])
3779 ;; The SVE logical instruction that implements an unspec.
3780 (define_int_attr logicalf_op [(UNSPEC_ANDF "and")
3781                               (UNSPEC_IORF "orr")
3782                               (UNSPEC_XORF "eor")])
3784 (define_int_attr last_op [(UNSPEC_CLASTA "after_last")
3785                           (UNSPEC_CLASTB "last")
3786                           (UNSPEC_LASTA "after_last")
3787                           (UNSPEC_LASTB "last")])
3789 ;; "s" for signed operations and "u" for unsigned ones.
3790 (define_int_attr su [(UNSPEC_SADDV "s")
3791                      (UNSPEC_UADDV "u")
3792                      (UNSPEC_UNPACKSHI "s")
3793                      (UNSPEC_UNPACKUHI "u")
3794                      (UNSPEC_UNPACKSLO "s")
3795                      (UNSPEC_UNPACKULO "u")
3796                      (UNSPEC_SMUL_HIGHPART "s")
3797                      (UNSPEC_UMUL_HIGHPART "u")
3798                      (UNSPEC_COND_FCVTZS "s")
3799                      (UNSPEC_COND_FCVTZU "u")
3800                      (UNSPEC_COND_SCVTF "s")
3801                      (UNSPEC_COND_UCVTF "u")
3802                      (UNSPEC_SMULHS "s") (UNSPEC_UMULHS "u")
3803                      (UNSPEC_SMULHRS "s") (UNSPEC_UMULHRS "u")])
3805 (define_int_attr sur [(UNSPEC_SHADD "s") (UNSPEC_UHADD "u")
3806                       (UNSPEC_SRHADD "sr") (UNSPEC_URHADD "ur")
3807                       (UNSPEC_SHSUB "s") (UNSPEC_UHSUB "u")
3808                       (UNSPEC_SADALP "s") (UNSPEC_UADALP "u")
3809                       (UNSPEC_USQADD "us") (UNSPEC_SUQADD "su")
3810                       (UNSPEC_SSLI  "s") (UNSPEC_USLI  "u")
3811                       (UNSPEC_SSRI  "s") (UNSPEC_USRI  "u")
3812                       (UNSPEC_USRA  "u") (UNSPEC_SSRA  "s")
3813                       (UNSPEC_URSHR  "ur") (UNSPEC_SRSHR  "sr")
3814                       (UNSPEC_SQSHLU "s") (UNSPEC_SQSHL   "s")
3815                       (UNSPEC_UQSHL  "u")
3816                       (UNSPEC_USHL  "u")   (UNSPEC_SSHL  "s")
3817                       (UNSPEC_USHLL  "u")  (UNSPEC_SSHLL "s")
3818                       (UNSPEC_URSHL  "ur") (UNSPEC_SRSHL  "sr")
3819                       (UNSPEC_UQRSHL  "u") (UNSPEC_SQRSHL  "s")
3820                       (UNSPEC_SDOT "s") (UNSPEC_UDOT "u")
3821                       (UNSPEC_USDOT "us") (UNSPEC_SUDOT "su")
3822                       (UNSPEC_SMATMUL "s") (UNSPEC_UMATMUL "u")
3823                       (UNSPEC_USMATMUL "us")
3826 (define_int_attr r [(UNSPEC_SQDMULH "") (UNSPEC_SQRDMULH "r")
3827                     (UNSPEC_SQSHL   "")  (UNSPEC_UQSHL  "")
3828                     (UNSPEC_SQRSHL   "r")(UNSPEC_UQRSHL  "r")
3829                     (UNSPEC_SMULHS "") (UNSPEC_UMULHS "")
3830                     (UNSPEC_SMULHRS "r") (UNSPEC_UMULHRS "r")
3833 (define_int_attr lr [(UNSPEC_SSLI  "l") (UNSPEC_USLI  "l")
3834                      (UNSPEC_SSRI  "r") (UNSPEC_USRI  "r")
3835                      (UNSPEC_SQSHL "l") (UNSPEC_UQSHL "l")
3836                      (UNSPEC_SQSHLU "l")
3837                      (UNSPEC_SRSHR "r") (UNSPEC_URSHR "r")
3838                      (UNSPEC_ASRD  "r")
3839                      (UNSPEC_SLI   "l") (UNSPEC_SRI   "r")])
3841 (define_int_attr u [(UNSPEC_SQSHLU "u") (UNSPEC_SQSHL "") (UNSPEC_UQSHL "")
3842                     (UNSPEC_SHADD "") (UNSPEC_UHADD "u")
3843                     (UNSPEC_SRHADD "") (UNSPEC_URHADD "u")])
3845 (define_int_attr fn [(UNSPEC_LDFF1 "f") (UNSPEC_LDNF1 "n")])
3847 (define_int_attr ab [(UNSPEC_CLASTA "a") (UNSPEC_CLASTB "b")
3848                      (UNSPEC_LASTA "a") (UNSPEC_LASTB "b")])
3850 (define_int_attr bt [(UNSPEC_BFMLALB "b") (UNSPEC_BFMLALT "t")])
3852 (define_int_attr addsub [(UNSPEC_SHADD "add")
3853                          (UNSPEC_UHADD "add")
3854                          (UNSPEC_SRHADD "add")
3855                          (UNSPEC_URHADD "add")
3856                          (UNSPEC_SHSUB "sub")
3857                          (UNSPEC_UHSUB "sub")])
3859 ;; BSL variants: first commutative operand.
3860 (define_int_attr bsl_1st [(1 "w") (2 "0")])
3862 ;; BSL variants: second commutative operand.
3863 (define_int_attr bsl_2nd [(1 "0") (2 "w")])
3865 ;; BSL variants: duplicated input operand.
3866 (define_int_attr bsl_dup [(1 "1") (2 "2")])
3868 ;; BSL variants: operand which requires preserving via movprfx.
3869 (define_int_attr bsl_mov [(1 "2") (2 "1")])
3871 (define_int_attr offsetlr [(UNSPEC_SSLI "") (UNSPEC_USLI "")
3872                            (UNSPEC_SSRI "offset_")
3873                            (UNSPEC_USRI "offset_")])
3875 ;; Standard pattern names for floating-point rounding instructions.
3876 (define_int_attr frint_pattern [(UNSPEC_FRINTZ "btrunc")
3877                                 (UNSPEC_FRINTP "ceil")
3878                                 (UNSPEC_FRINTM "floor")
3879                                 (UNSPEC_FRINTI "nearbyint")
3880                                 (UNSPEC_FRINTX "rint")
3881                                 (UNSPEC_FRINTA "round")
3882                                 (UNSPEC_FRINTN "roundeven")])
3884 ;; frint suffix for floating-point rounding instructions.
3885 (define_int_attr frint_suffix [(UNSPEC_FRINTZ "z") (UNSPEC_FRINTP "p")
3886                                (UNSPEC_FRINTM "m") (UNSPEC_FRINTI "i")
3887                                (UNSPEC_FRINTX "x") (UNSPEC_FRINTA "a")
3888                                (UNSPEC_FRINTN "n")])
3890 (define_int_attr fcvt_pattern [(UNSPEC_FRINTZ "btrunc") (UNSPEC_FRINTA "round")
3891                                (UNSPEC_FRINTP "ceil") (UNSPEC_FRINTM "floor")
3892                                (UNSPEC_FRINTN "frintn")])
3894 (define_int_attr fcvt_fixed_insn [(UNSPEC_SCVTF "scvtf")
3895                                   (UNSPEC_UCVTF "ucvtf")
3896                                   (UNSPEC_FCVTZS "fcvtzs")
3897                                   (UNSPEC_FCVTZU "fcvtzu")])
3899 ;; Pointer authentication mnemonic prefix.
3900 (define_int_attr pauth_mnem_prefix [(UNSPEC_PACIASP "pacia")
3901                                     (UNSPEC_PACIBSP "pacib")
3902                                     (UNSPEC_PACIA1716 "pacia")
3903                                     (UNSPEC_PACIB1716 "pacib")
3904                                     (UNSPEC_AUTIASP "autia")
3905                                     (UNSPEC_AUTIBSP "autib")
3906                                     (UNSPEC_AUTIA1716 "autia")
3907                                     (UNSPEC_AUTIB1716 "autib")])
3909 (define_int_attr pauth_key [(UNSPEC_PACIASP "AARCH64_KEY_A")
3910                             (UNSPEC_PACIBSP "AARCH64_KEY_B")
3911                             (UNSPEC_PACIA1716 "AARCH64_KEY_A")
3912                             (UNSPEC_PACIB1716 "AARCH64_KEY_B")
3913                             (UNSPEC_AUTIASP "AARCH64_KEY_A")
3914                             (UNSPEC_AUTIBSP "AARCH64_KEY_B")
3915                             (UNSPEC_AUTIA1716 "AARCH64_KEY_A")
3916                             (UNSPEC_AUTIB1716 "AARCH64_KEY_B")])
3918 ;; Pointer authentication HINT number for NOP space instructions using A and
3919 ;; B key.
3920 (define_int_attr pauth_hint_num [(UNSPEC_PACIASP "25")
3921                                    (UNSPEC_PACIBSP "27")
3922                                    (UNSPEC_AUTIASP "29")
3923                                    (UNSPEC_AUTIBSP "31")
3924                                    (UNSPEC_PACIA1716 "8")
3925                                    (UNSPEC_PACIB1716 "10")
3926                                    (UNSPEC_AUTIA1716 "12")
3927                                    (UNSPEC_AUTIB1716 "14")])
3929 (define_int_attr perm_insn [(UNSPEC_ZIP1 "zip1") (UNSPEC_ZIP2 "zip2")
3930                             (UNSPEC_ZIP1Q "zip1") (UNSPEC_ZIP2Q "zip2")
3931                             (UNSPEC_TRN1 "trn1") (UNSPEC_TRN2 "trn2")
3932                             (UNSPEC_TRN1Q "trn1") (UNSPEC_TRN2Q "trn2")
3933                             (UNSPEC_UZP1 "uzp1") (UNSPEC_UZP2 "uzp2")
3934                             (UNSPEC_UZP1Q "uzp1") (UNSPEC_UZP2Q "uzp2")
3935                             (UNSPEC_UZP "uzp") (UNSPEC_UZPQ "uzp")
3936                             (UNSPEC_ZIP "zip") (UNSPEC_ZIPQ "zip")])
3938 ; op code for REV instructions (size within which elements are reversed).
3939 (define_int_attr rev_op [(UNSPEC_REV64 "64") (UNSPEC_REV32 "32")
3940                          (UNSPEC_REV16 "16")])
3942 (define_int_attr perm_hilo [(UNSPEC_UNPACKSHI "hi") (UNSPEC_UNPACKUHI "hi")
3943                             (UNSPEC_UNPACKSLO "lo") (UNSPEC_UNPACKULO "lo")])
3945 ;; Return true if the associated optab refers to the high-numbered lanes,
3946 ;; false if it refers to the low-numbered lanes.  The convention is for
3947 ;; "hi" to refer to the low-numbered lanes (the first ones in memory)
3948 ;; for big-endian.
3949 (define_int_attr hi_lanes_optab [(UNSPEC_UNPACKSHI "!BYTES_BIG_ENDIAN")
3950                                  (UNSPEC_UNPACKUHI "!BYTES_BIG_ENDIAN")
3951                                  (UNSPEC_UNPACKSLO "BYTES_BIG_ENDIAN")
3952                                  (UNSPEC_UNPACKULO "BYTES_BIG_ENDIAN")])
3954 (define_int_attr crc_variant [(UNSPEC_CRC32B "crc32b") (UNSPEC_CRC32H "crc32h")
3955                         (UNSPEC_CRC32W "crc32w") (UNSPEC_CRC32X "crc32x")
3956                         (UNSPEC_CRC32CB "crc32cb") (UNSPEC_CRC32CH "crc32ch")
3957                         (UNSPEC_CRC32CW "crc32cw") (UNSPEC_CRC32CX "crc32cx")])
3959 (define_int_attr crc_mode [(UNSPEC_CRC32B "QI") (UNSPEC_CRC32H "HI")
3960                         (UNSPEC_CRC32W "SI") (UNSPEC_CRC32X "DI")
3961                         (UNSPEC_CRC32CB "QI") (UNSPEC_CRC32CH "HI")
3962                         (UNSPEC_CRC32CW "SI") (UNSPEC_CRC32CX "DI")])
3964 (define_int_attr aes_op [(UNSPEC_AESE "e") (UNSPEC_AESD "d")])
3965 (define_int_attr aesmc_op [(UNSPEC_AESMC "mc") (UNSPEC_AESIMC "imc")])
3967 (define_int_attr sha1_op [(UNSPEC_SHA1C "c") (UNSPEC_SHA1P "p")
3968                           (UNSPEC_SHA1M "m")])
3970 (define_int_attr sha256_op [(UNSPEC_SHA256H "") (UNSPEC_SHA256H2 "2")])
3972 (define_int_attr rdma_as [(UNSPEC_SQRDMLAH "a") (UNSPEC_SQRDMLSH "s")])
3974 (define_int_attr sha512_op [(UNSPEC_SHA512H "") (UNSPEC_SHA512H2 "2")])
3976 (define_int_attr sm3tt_op [(UNSPEC_SM3TT1A "1a") (UNSPEC_SM3TT1B "1b")
3977                            (UNSPEC_SM3TT2A "2a") (UNSPEC_SM3TT2B "2b")])
3979 (define_int_attr sm3part_op [(UNSPEC_SM3PARTW1 "1") (UNSPEC_SM3PARTW2 "2")])
3981 (define_int_attr f16mac1 [(UNSPEC_FMLAL "a") (UNSPEC_FMLSL "s")
3982                           (UNSPEC_FMLAL2 "a") (UNSPEC_FMLSL2 "s")])
3984 (define_int_attr frintnzs_op [(UNSPEC_FRINT32Z "frint32z") (UNSPEC_FRINT32X "frint32x")
3985                               (UNSPEC_FRINT64Z "frint64z") (UNSPEC_FRINT64X "frint64x")])
3987 ;; The condition associated with an UNSPEC_COND_<xx>.
3988 (define_int_attr cmp_op [(UNSPEC_COND_CMPEQ_WIDE "eq")
3989                          (UNSPEC_COND_CMPGE_WIDE "ge")
3990                          (UNSPEC_COND_CMPGT_WIDE "gt")
3991                          (UNSPEC_COND_CMPHI_WIDE "hi")
3992                          (UNSPEC_COND_CMPHS_WIDE "hs")
3993                          (UNSPEC_COND_CMPLE_WIDE "le")
3994                          (UNSPEC_COND_CMPLO_WIDE "lo")
3995                          (UNSPEC_COND_CMPLS_WIDE "ls")
3996                          (UNSPEC_COND_CMPLT_WIDE "lt")
3997                          (UNSPEC_COND_CMPNE_WIDE "ne")
3998                          (UNSPEC_COND_FCMEQ "eq")
3999                          (UNSPEC_COND_FCMGE "ge")
4000                          (UNSPEC_COND_FCMGT "gt")
4001                          (UNSPEC_COND_FCMLE "le")
4002                          (UNSPEC_COND_FCMLT "lt")
4003                          (UNSPEC_COND_FCMNE "ne")
4004                          (UNSPEC_WHILEGE "ge")
4005                          (UNSPEC_WHILEGT "gt")
4006                          (UNSPEC_WHILEHI "hi")
4007                          (UNSPEC_WHILEHS "hs")
4008                          (UNSPEC_WHILELE "le")
4009                          (UNSPEC_WHILELO "lo")
4010                          (UNSPEC_WHILELS "ls")
4011                          (UNSPEC_WHILELT "lt")
4012                          (UNSPEC_WHILERW "rw")
4013                          (UNSPEC_WHILEWR "wr")])
4015 (define_int_attr while_optab_cmp [(UNSPEC_WHILEGE "ge")
4016                                   (UNSPEC_WHILEGT "gt")
4017                                   (UNSPEC_WHILEHI "ugt")
4018                                   (UNSPEC_WHILEHS "uge")
4019                                   (UNSPEC_WHILELE "le")
4020                                   (UNSPEC_WHILELO "ult")
4021                                   (UNSPEC_WHILELS "ule")
4022                                   (UNSPEC_WHILELT "lt")
4023                                   (UNSPEC_WHILERW "rw")
4024                                   (UNSPEC_WHILEWR "wr")])
4026 (define_int_attr raw_war [(UNSPEC_WHILERW "raw")
4027                           (UNSPEC_WHILEWR "war")])
4029 (define_int_attr brk_op [(UNSPEC_BRKA "a") (UNSPEC_BRKB "b")
4030                          (UNSPEC_BRKN "n")
4031                          (UNSPEC_BRKPA "pa") (UNSPEC_BRKPB "pb")])
4033 (define_int_attr sve_pred_op [(UNSPEC_PFIRST "pfirst") (UNSPEC_PNEXT "pnext")])
4035 (define_int_attr sve_int_op [(UNSPEC_ADCLB "adclb")
4036                              (UNSPEC_ADCLT "adclt")
4037                              (UNSPEC_ADDHNB "addhnb")
4038                              (UNSPEC_ADDHNT "addhnt")
4039                              (UNSPEC_ADDP "addp")
4040                              (UNSPEC_ANDV "andv")
4041                              (UNSPEC_ASHIFTRT_WIDE "asr")
4042                              (UNSPEC_ASHIFT_WIDE "lsl")
4043                              (UNSPEC_ASRD "asrd")
4044                              (UNSPEC_BDEP "bdep")
4045                              (UNSPEC_BEXT "bext")
4046                              (UNSPEC_BGRP "bgrp")
4047                              (UNSPEC_CADD90 "cadd")
4048                              (UNSPEC_CADD270 "cadd")
4049                              (UNSPEC_CDOT "cdot")
4050                              (UNSPEC_CDOT90 "cdot")
4051                              (UNSPEC_CDOT180 "cdot")
4052                              (UNSPEC_CDOT270 "cdot")
4053                              (UNSPEC_CMLA "cmla")
4054                              (UNSPEC_CMLA90 "cmla")
4055                              (UNSPEC_CMLA180 "cmla")
4056                              (UNSPEC_CMLA270 "cmla")
4057                              (UNSPEC_EORBT "eorbt")
4058                              (UNSPEC_EORTB "eortb")
4059                              (UNSPEC_IORV "orv")
4060                              (UNSPEC_LSHIFTRT_WIDE "lsr")
4061                              (UNSPEC_MATCH "match")
4062                              (UNSPEC_NMATCH "nmatch")
4063                              (UNSPEC_PMULLB "pmullb")
4064                              (UNSPEC_PMULLB_PAIR "pmullb")
4065                              (UNSPEC_PMULLT "pmullt")
4066                              (UNSPEC_PMULLT_PAIR "pmullt")
4067                              (UNSPEC_RADDHNB "raddhnb")
4068                              (UNSPEC_RADDHNT "raddhnt")
4069                              (UNSPEC_REVB "revb")
4070                              (UNSPEC_REVH "revh")
4071                              (UNSPEC_REVW "revw")
4072                              (UNSPEC_RSHRNB "rshrnb")
4073                              (UNSPEC_RSHRNT "rshrnt")
4074                              (UNSPEC_RSQRTE "ursqrte")
4075                              (UNSPEC_RSUBHNB "rsubhnb")
4076                              (UNSPEC_RSUBHNT "rsubhnt")
4077                              (UNSPEC_SABDLB "sabdlb")
4078                              (UNSPEC_SABDLT "sabdlt")
4079                              (UNSPEC_SADALP "sadalp")
4080                              (UNSPEC_SADDLB "saddlb")
4081                              (UNSPEC_SADDLBT "saddlbt")
4082                              (UNSPEC_SADDLT "saddlt")
4083                              (UNSPEC_SADDWB "saddwb")
4084                              (UNSPEC_SADDWT "saddwt")
4085                              (UNSPEC_SBCLB "sbclb")
4086                              (UNSPEC_SBCLT "sbclt")
4087                              (UNSPEC_SHADD "shadd")
4088                              (UNSPEC_SHRNB "shrnb")
4089                              (UNSPEC_SHRNT "shrnt")
4090                              (UNSPEC_SHSUB "shsub")
4091                              (UNSPEC_SLI "sli")
4092                              (UNSPEC_SMAXP "smaxp")
4093                              (UNSPEC_SMAXV "smaxv")
4094                              (UNSPEC_SMINP "sminp")
4095                              (UNSPEC_SMINV "sminv")
4096                              (UNSPEC_SMUL_HIGHPART "smulh")
4097                              (UNSPEC_SMULLB "smullb")
4098                              (UNSPEC_SMULLT "smullt")
4099                              (UNSPEC_SQCADD90 "sqcadd")
4100                              (UNSPEC_SQCADD270 "sqcadd")
4101                              (UNSPEC_SQDMULH "sqdmulh")
4102                              (UNSPEC_SQDMULLB "sqdmullb")
4103                              (UNSPEC_SQDMULLBT "sqdmullbt")
4104                              (UNSPEC_SQDMULLT "sqdmullt")
4105                              (UNSPEC_SQRDCMLAH "sqrdcmlah")
4106                              (UNSPEC_SQRDCMLAH90 "sqrdcmlah")
4107                              (UNSPEC_SQRDCMLAH180 "sqrdcmlah")
4108                              (UNSPEC_SQRDCMLAH270 "sqrdcmlah")
4109                              (UNSPEC_SQRDMLAH "sqrdmlah")
4110                              (UNSPEC_SQRDMLSH "sqrdmlsh")
4111                              (UNSPEC_SQRDMULH "sqrdmulh")
4112                              (UNSPEC_SQRSHL "sqrshl")
4113                              (UNSPEC_SQRSHR "sqrshr")
4114                              (UNSPEC_SQRSHRN "sqrshrn")
4115                              (UNSPEC_SQRSHRNB "sqrshrnb")
4116                              (UNSPEC_SQRSHRNT "sqrshrnt")
4117                              (UNSPEC_SQRSHRU "sqrshru")
4118                              (UNSPEC_SQRSHRUN "sqrshrun")
4119                              (UNSPEC_SQRSHRUNB "sqrshrunb")
4120                              (UNSPEC_SQRSHRUNT "sqrshrunt")
4121                              (UNSPEC_SQSHL "sqshl")
4122                              (UNSPEC_SQSHLU "sqshlu")
4123                              (UNSPEC_SQSHRNB "sqshrnb")
4124                              (UNSPEC_SQSHRNT "sqshrnt")
4125                              (UNSPEC_SQSHRUNB "sqshrunb")
4126                              (UNSPEC_SQSHRUNT "sqshrunt")
4127                              (UNSPEC_SQXTNB "sqxtnb")
4128                              (UNSPEC_SQXTNT "sqxtnt")
4129                              (UNSPEC_SQXTUNB "sqxtunb")
4130                              (UNSPEC_SQXTUNT "sqxtunt")
4131                              (UNSPEC_SRHADD "srhadd")
4132                              (UNSPEC_SRI "sri")
4133                              (UNSPEC_SRSHL "srshl")
4134                              (UNSPEC_SRSHR "srshr")
4135                              (UNSPEC_SSHLLB "sshllb")
4136                              (UNSPEC_SSHLLT "sshllt")
4137                              (UNSPEC_SSUBLB "ssublb")
4138                              (UNSPEC_SSUBLBT "ssublbt")
4139                              (UNSPEC_SSUBLT "ssublt")
4140                              (UNSPEC_SSUBLTB "ssubltb")
4141                              (UNSPEC_SSUBWB "ssubwb")
4142                              (UNSPEC_SSUBWT "ssubwt")
4143                              (UNSPEC_SUBHNB "subhnb")
4144                              (UNSPEC_SUBHNT "subhnt")
4145                              (UNSPEC_SUQADD "suqadd")
4146                              (UNSPEC_UABDLB "uabdlb")
4147                              (UNSPEC_UABDLT "uabdlt")
4148                              (UNSPEC_UADALP "uadalp")
4149                              (UNSPEC_UADDLB "uaddlb")
4150                              (UNSPEC_UADDLT "uaddlt")
4151                              (UNSPEC_UADDWB "uaddwb")
4152                              (UNSPEC_UADDWT "uaddwt")
4153                              (UNSPEC_UHADD "uhadd")
4154                              (UNSPEC_UHSUB "uhsub")
4155                              (UNSPEC_UMAXP "umaxp")
4156                              (UNSPEC_UMAXV "umaxv")
4157                              (UNSPEC_UMINP "uminp")
4158                              (UNSPEC_UMINV "uminv")
4159                              (UNSPEC_UMUL_HIGHPART "umulh")
4160                              (UNSPEC_UMULLB "umullb")
4161                              (UNSPEC_UMULLT "umullt")
4162                              (UNSPEC_UQRSHL "uqrshl")
4163                              (UNSPEC_UQRSHR "uqrshr")
4164                              (UNSPEC_UQRSHRN "uqrshrn")
4165                              (UNSPEC_UQRSHRNB "uqrshrnb")
4166                              (UNSPEC_UQRSHRNT "uqrshrnt")
4167                              (UNSPEC_UQSHL "uqshl")
4168                              (UNSPEC_UQSHRNB "uqshrnb")
4169                              (UNSPEC_UQSHRNT "uqshrnt")
4170                              (UNSPEC_UQXTNB "uqxtnb")
4171                              (UNSPEC_UQXTNT "uqxtnt")
4172                              (UNSPEC_URECPE "urecpe")
4173                              (UNSPEC_URHADD "urhadd")
4174                              (UNSPEC_URSHL "urshl")
4175                              (UNSPEC_URSHR "urshr")
4176                              (UNSPEC_USHLLB "ushllb")
4177                              (UNSPEC_USHLLT "ushllt")
4178                              (UNSPEC_USQADD "usqadd")
4179                              (UNSPEC_USUBLB "usublb")
4180                              (UNSPEC_USUBLT "usublt")
4181                              (UNSPEC_USUBWB "usubwb")
4182                              (UNSPEC_USUBWT "usubwt")
4183                              (UNSPEC_XORV "eorv")])
4185 (define_int_attr sve_int_op_rev [(UNSPEC_SHADD "shadd")
4186                                  (UNSPEC_SHSUB "shsubr")
4187                                  (UNSPEC_SQRSHL "sqrshlr")
4188                                  (UNSPEC_SRHADD "srhadd")
4189                                  (UNSPEC_SRSHL "srshlr")
4190                                  (UNSPEC_UHADD "uhadd")
4191                                  (UNSPEC_UHSUB "uhsubr")
4192                                  (UNSPEC_UQRSHL "uqrshlr")
4193                                  (UNSPEC_URHADD "urhadd")
4194                                  (UNSPEC_URSHL "urshlr")])
4196 (define_int_attr sve_int_add_op [(UNSPEC_SABDLB "sabalb")
4197                                  (UNSPEC_SABDLT "sabalt")
4198                                  (UNSPEC_SMULLB "smlalb")
4199                                  (UNSPEC_SMULLT "smlalt")
4200                                  (UNSPEC_UABDLB "uabalb")
4201                                  (UNSPEC_UABDLT "uabalt")
4202                                  (UNSPEC_UMULLB "umlalb")
4203                                  (UNSPEC_UMULLT "umlalt")])
4205 (define_int_attr sve_int_qadd_op [(UNSPEC_SQDMULLB "sqdmlalb")
4206                                   (UNSPEC_SQDMULLBT "sqdmlalbt")
4207                                   (UNSPEC_SQDMULLT "sqdmlalt")])
4209 (define_int_attr sve_int_sub_op [(UNSPEC_SMULLB "smlslb")
4210                                  (UNSPEC_SMULLT "smlslt")
4211                                  (UNSPEC_UMULLB "umlslb")
4212                                  (UNSPEC_UMULLT "umlslt")])
4214 (define_int_attr sve_int_qsub_op [(UNSPEC_SQDMULLB "sqdmlslb")
4215                                   (UNSPEC_SQDMULLBT "sqdmlslbt")
4216                                   (UNSPEC_SQDMULLT "sqdmlslt")])
4218 (define_int_attr sve_fp_op [(UNSPEC_BFDOT "bfdot")
4219                             (UNSPEC_BFMLALB "bfmlalb")
4220                             (UNSPEC_BFMLALT "bfmlalt")
4221                             (UNSPEC_BFMLSLB "bfmlslb")
4222                             (UNSPEC_BFMLSLT "bfmlslt")
4223                             (UNSPEC_BFMMLA "bfmmla")
4224                             (UNSPEC_FRECPE "frecpe")
4225                             (UNSPEC_FRECPS "frecps")
4226                             (UNSPEC_RSQRTE "frsqrte")
4227                             (UNSPEC_RSQRTS "frsqrts")
4228                             (UNSPEC_FADDP "faddp")
4229                             (UNSPEC_FADDV "faddv")
4230                             (UNSPEC_FEXPA "fexpa")
4231                             (UNSPEC_FMAXNMP "fmaxnmp")
4232                             (UNSPEC_FMAXNMV "fmaxnmv")
4233                             (UNSPEC_FMAXP "fmaxp")
4234                             (UNSPEC_FMAXV "fmaxv")
4235                             (UNSPEC_FMINNMP "fminnmp")
4236                             (UNSPEC_FMINNMV "fminnmv")
4237                             (UNSPEC_FMINP "fminp")
4238                             (UNSPEC_FMINV "fminv")
4239                             (UNSPEC_FMLA "fmla")
4240                             (UNSPEC_FMLALB "fmlalb")
4241                             (UNSPEC_FMLALT "fmlalt")
4242                             (UNSPEC_FMLS "fmls")
4243                             (UNSPEC_FMLSLB "fmlslb")
4244                             (UNSPEC_FMLSLT "fmlslt")
4245                             (UNSPEC_FMMLA "fmmla")
4246                             (UNSPEC_FTSMUL "ftsmul")
4247                             (UNSPEC_FTSSEL "ftssel")
4248                             (UNSPEC_COND_FABS "fabs")
4249                             (UNSPEC_COND_FADD "fadd")
4250                             (UNSPEC_COND_FAMAX "famax")
4251                             (UNSPEC_COND_FAMIN "famin")
4252                             (UNSPEC_COND_FCVTLT "fcvtlt")
4253                             (UNSPEC_COND_FCVTX "fcvtx")
4254                             (UNSPEC_COND_FDIV "fdiv")
4255                             (UNSPEC_COND_FLOGB "flogb")
4256                             (UNSPEC_COND_FMAX "fmax")
4257                             (UNSPEC_COND_FMAXNM "fmaxnm")
4258                             (UNSPEC_COND_FMIN "fmin")
4259                             (UNSPEC_COND_FMINNM "fminnm")
4260                             (UNSPEC_COND_FMUL "fmul")
4261                             (UNSPEC_COND_FMULX "fmulx")
4262                             (UNSPEC_COND_FNEG "fneg")
4263                             (UNSPEC_COND_FRECPX "frecpx")
4264                             (UNSPEC_COND_FRINTA "frinta")
4265                             (UNSPEC_COND_FRINTI "frinti")
4266                             (UNSPEC_COND_FRINTM "frintm")
4267                             (UNSPEC_COND_FRINTN "frintn")
4268                             (UNSPEC_COND_FRINTP "frintp")
4269                             (UNSPEC_COND_FRINTX "frintx")
4270                             (UNSPEC_COND_FRINTZ "frintz")
4271                             (UNSPEC_COND_FSCALE "fscale")
4272                             (UNSPEC_COND_FSQRT "fsqrt")
4273                             (UNSPEC_COND_FSUB "fsub")
4274                             (UNSPEC_COND_SMAX "fmaxnm")
4275                             (UNSPEC_COND_SMIN "fminnm")])
4277 (define_int_attr sve_fp_op_rev [(UNSPEC_COND_FADD "fadd")
4278                                 (UNSPEC_COND_FAMAX "famax")
4279                                 (UNSPEC_COND_FAMIN "famin")
4280                                 (UNSPEC_COND_FDIV "fdivr")
4281                                 (UNSPEC_COND_FMAX "fmax")
4282                                 (UNSPEC_COND_FMAXNM "fmaxnm")
4283                                 (UNSPEC_COND_FMIN "fmin")
4284                                 (UNSPEC_COND_FMINNM "fminnm")
4285                                 (UNSPEC_COND_FMUL "fmul")
4286                                 (UNSPEC_COND_FMULX "fmulx")
4287                                 (UNSPEC_COND_FSUB "fsubr")
4288                                 (UNSPEC_COND_SMAX "fmaxnm")
4289                                 (UNSPEC_COND_SMIN "fminnm")])
4291 (define_int_attr sme_int_op [(UNSPEC_SME_ADD_WRITE "add")
4292                              (UNSPEC_SME_SUB_WRITE "sub")])
4294 (define_int_attr rot [(UNSPEC_CADD90 "90")
4295                       (UNSPEC_CADD270 "270")
4296                       (UNSPEC_CDOT "0")
4297                       (UNSPEC_CDOT90 "90")
4298                       (UNSPEC_CDOT180 "180")
4299                       (UNSPEC_CDOT270 "270")
4300                       (UNSPEC_CMLA "0")
4301                       (UNSPEC_CMLA90 "90")
4302                       (UNSPEC_CMLA180 "180")
4303                       (UNSPEC_CMLA270 "270")
4304                       (UNSPEC_FCADD90 "90")
4305                       (UNSPEC_FCADD270 "270")
4306                       (UNSPEC_FCMLA "0")
4307                       (UNSPEC_FCMLA90 "90")
4308                       (UNSPEC_FCMLA180 "180")
4309                       (UNSPEC_FCMLA270 "270")
4310                       (UNSPEC_SQCADD90 "90")
4311                       (UNSPEC_SQCADD270 "270")
4312                       (UNSPEC_SQRDCMLAH "0")
4313                       (UNSPEC_SQRDCMLAH90 "90")
4314                       (UNSPEC_SQRDCMLAH180 "180")
4315                       (UNSPEC_SQRDCMLAH270 "270")
4316                       (UNSPEC_COND_FCADD90 "90")
4317                       (UNSPEC_COND_FCADD270 "270")
4318                       (UNSPEC_COND_FCMLA "0")
4319                       (UNSPEC_COND_FCMLA90 "90")
4320                       (UNSPEC_COND_FCMLA180 "180")
4321                       (UNSPEC_COND_FCMLA270 "270")
4322                       (UNSPEC_FCMUL "0")
4323                       (UNSPEC_FCMUL_CONJ "180")])
4325 ;; A conjucate is a negation of the imaginary component
4326 ;; The number in the unspecs are the rotation component of the instruction, e.g
4327 ;; FCMLA180 means use the instruction with #180.
4328 ;; The iterator is used to produce the right name mangling for the function.
4329 (define_int_attr conj_op [(UNSPEC_FCMLA180 "")
4330                           (UNSPEC_FCMLA180_CONJ "_conj")
4331                           (UNSPEC_FCMLA "")
4332                           (UNSPEC_FCMLA_CONJ "_conj")
4333                           (UNSPEC_FCMUL "")
4334                           (UNSPEC_FCMUL_CONJ "_conj")
4335                           (UNSPEC_CMLA "")
4336                           (UNSPEC_CMLA180 "")
4337                           (UNSPEC_CMLA180_CONJ "_conj")
4338                           (UNSPEC_CMLA_CONJ "_conj")
4339                           (UNSPEC_CMUL "")
4340                           (UNSPEC_CMUL_CONJ "_conj")])
4342 ;; The complex operations when performed on a real complex number require two
4343 ;; instructions to perform the operation. e.g. complex multiplication requires
4344 ;; two FCMUL with a particular rotation value.
4346 ;; These values can be looked up in rotsplit1 and rotsplit2.  as an example
4347 ;; FCMUL needs the first instruction to use #0 and the second #90.
4348 (define_int_attr rotsplit1 [(UNSPEC_FCMLA "0")
4349                             (UNSPEC_FCMLA_CONJ "0")
4350                             (UNSPEC_FCMUL "0")
4351                             (UNSPEC_FCMUL_CONJ "0")
4352                             (UNSPEC_FCMLA180 "180")
4353                             (UNSPEC_FCMLA180_CONJ "180")])
4355 (define_int_attr rotsplit2 [(UNSPEC_FCMLA "90")
4356                             (UNSPEC_FCMLA_CONJ "270")
4357                             (UNSPEC_FCMUL "90")
4358                             (UNSPEC_FCMUL_CONJ "270")
4359                             (UNSPEC_FCMLA180 "270")
4360                             (UNSPEC_FCMLA180_CONJ "90")])
4362 ;; SVE has slightly different namings from NEON so we have to split these
4363 ;; iterators.
4364 (define_int_attr sve_rot1 [(UNSPEC_FCMLA "")
4365                            (UNSPEC_FCMLA_CONJ "")
4366                            (UNSPEC_FCMUL "")
4367                            (UNSPEC_FCMUL_CONJ "")
4368                            (UNSPEC_FCMLA180 "180")
4369                            (UNSPEC_FCMLA180_CONJ "180")
4370                            (UNSPEC_CMLA "")
4371                            (UNSPEC_CMLA_CONJ "")
4372                            (UNSPEC_CMUL "")
4373                            (UNSPEC_CMUL_CONJ "")
4374                            (UNSPEC_CMLA180 "180")
4375                            (UNSPEC_CMLA180_CONJ "180")])
4377 (define_int_attr sve_rot2 [(UNSPEC_FCMLA "90")
4378                            (UNSPEC_FCMLA_CONJ "270")
4379                            (UNSPEC_FCMUL "90")
4380                            (UNSPEC_FCMUL_CONJ "270")
4381                            (UNSPEC_FCMLA180 "270")
4382                            (UNSPEC_FCMLA180_CONJ "90")
4383                            (UNSPEC_CMLA "90")
4384                            (UNSPEC_CMLA_CONJ "270")
4385                            (UNSPEC_CMUL "90")
4386                            (UNSPEC_CMUL_CONJ "270")
4387                            (UNSPEC_CMLA180 "270")
4388                            (UNSPEC_CMLA180_CONJ "90")])
4391 (define_int_attr fcmac1 [(UNSPEC_FCMLA "a") (UNSPEC_FCMLA_CONJ "a")
4392                          (UNSPEC_FCMLA180 "s") (UNSPEC_FCMLA180_CONJ "s")
4393                          (UNSPEC_CMLA "a") (UNSPEC_CMLA_CONJ "a")
4394                          (UNSPEC_CMLA180 "s") (UNSPEC_CMLA180_CONJ "s")])
4396 (define_int_attr sve_fmla_op [(UNSPEC_COND_FMLA "fmla")
4397                               (UNSPEC_COND_FMLS "fmls")
4398                               (UNSPEC_COND_FNMLA "fnmla")
4399                               (UNSPEC_COND_FNMLS "fnmls")])
4401 (define_int_attr sve_fmad_op [(UNSPEC_COND_FMLA "fmad")
4402                               (UNSPEC_COND_FMLS "fmsb")
4403                               (UNSPEC_COND_FNMLA "fnmad")
4404                               (UNSPEC_COND_FNMLS "fnmsb")])
4406 ;; The register constraint to use for the final operand in a binary BRK.
4407 (define_int_attr brk_reg_con [(UNSPEC_BRKN "0")
4408                               (UNSPEC_BRKPA "Upa") (UNSPEC_BRKPB "Upa")])
4410 ;; The register number to print for the above.
4411 (define_int_attr brk_reg_opno [(UNSPEC_BRKN "0")
4412                                (UNSPEC_BRKPA "3") (UNSPEC_BRKPB "3")])
4414 ;; The predicate to use for the first input operand in a floating-point
4415 ;; <optab><mode>3 pattern.
4416 (define_int_attr sve_pred_fp_rhs1_operand
4417   [(UNSPEC_COND_FADD "register_operand")
4418    (UNSPEC_COND_FAMAX "register_operand")
4419    (UNSPEC_COND_FAMIN "register_operand")
4420    (UNSPEC_COND_FDIV "register_operand")
4421    (UNSPEC_COND_FMAX "register_operand")
4422    (UNSPEC_COND_FMAXNM "register_operand")
4423    (UNSPEC_COND_FMIN "register_operand")
4424    (UNSPEC_COND_FMINNM "register_operand")
4425    (UNSPEC_COND_FMUL "register_operand")
4426    (UNSPEC_COND_FMULX "register_operand")
4427    (UNSPEC_COND_FSUB "aarch64_sve_float_arith_operand")
4428    (UNSPEC_COND_SMAX "register_operand")
4429    (UNSPEC_COND_SMIN "register_operand")])
4431 ;; The predicate to use for the second input operand in a floating-point
4432 ;; <optab><mode>3 pattern.
4433 (define_int_attr sve_pred_fp_rhs2_operand
4434   [(UNSPEC_COND_FADD "aarch64_sve_float_arith_with_sub_operand")
4435    (UNSPEC_COND_FAMAX "register_operand")
4436    (UNSPEC_COND_FAMIN "register_operand")
4437    (UNSPEC_COND_FDIV "register_operand")
4438    (UNSPEC_COND_FMAX "aarch64_sve_float_maxmin_operand")
4439    (UNSPEC_COND_FMAXNM "aarch64_sve_float_maxmin_operand")
4440    (UNSPEC_COND_FMIN "aarch64_sve_float_maxmin_operand")
4441    (UNSPEC_COND_FMINNM "aarch64_sve_float_maxmin_operand")
4442    (UNSPEC_COND_FMUL "aarch64_sve_float_mul_operand")
4443    (UNSPEC_COND_FMULX "register_operand")
4444    (UNSPEC_COND_FSUB "register_operand")
4445    (UNSPEC_COND_SMAX "aarch64_sve_float_maxmin_operand")
4446    (UNSPEC_COND_SMIN "aarch64_sve_float_maxmin_operand")])
4448 ;; Likewise for immediates only.
4449 (define_int_attr sve_pred_fp_rhs2_immediate
4450   [(UNSPEC_COND_FMAX "aarch64_sve_float_maxmin_immediate")
4451    (UNSPEC_COND_FMAXNM "aarch64_sve_float_maxmin_immediate")
4452    (UNSPEC_COND_FMIN "aarch64_sve_float_maxmin_immediate")
4453    (UNSPEC_COND_FMINNM "aarch64_sve_float_maxmin_immediate")
4454    (UNSPEC_COND_FMUL "aarch64_sve_float_mul_immediate")
4455    (UNSPEC_COND_SMAX "aarch64_sve_float_maxmin_immediate")
4456    (UNSPEC_COND_SMIN "aarch64_sve_float_maxmin_immediate")])
4458 ;; The maximum number of element bits that an instruction can handle.
4459 (define_int_attr max_elem_bits [(UNSPEC_UADDV "64") (UNSPEC_SADDV "32")
4460                                 (UNSPEC_PFIRST "8") (UNSPEC_PNEXT "64")])
4462 ;; The minimum number of element bits that an instruction can handle.
4463 (define_int_attr min_elem_bits [(UNSPEC_REVB "16")
4464                                 (UNSPEC_REVH "32")
4465                                 (UNSPEC_REVW "64")])
4467 (define_int_attr unspec [(UNSPEC_WHILERW "UNSPEC_WHILERW")
4468                          (UNSPEC_WHILEWR "UNSPEC_WHILEWR")])
4470 (define_int_attr hv [(UNSPEC_SME_LD1_HOR "h")
4471                      (UNSPEC_SME_LD1_VER "v")
4472                      (UNSPEC_SME_READ_HOR "h")
4473                      (UNSPEC_SME_READ_VER "v")
4474                      (UNSPEC_SME_ST1_HOR "h")
4475                      (UNSPEC_SME_ST1_VER "v")
4476                      (UNSPEC_SME_WRITE_HOR "h")
4477                      (UNSPEC_SME_WRITE_VER "v")])
4479 (define_int_attr has_16bit_form [(UNSPEC_SME_SDOT "true")
4480                                  (UNSPEC_SME_SVDOT "true")
4481                                  (UNSPEC_SME_UDOT "true")
4482                                  (UNSPEC_SME_UVDOT "true")
4483                                  (UNSPEC_SME_SUDOT "false")
4484                                  (UNSPEC_SME_SUVDOT "false")
4485                                  (UNSPEC_SME_USDOT "false")
4486                                  (UNSPEC_SME_USVDOT "false")])
4488 ;; Iterators and attributes for fpcr fpsr getter setters
4490 (define_int_iterator GET_FPSCR
4491   [UNSPECV_GET_FPSR UNSPECV_GET_FPCR])
4493 (define_int_iterator SET_FPSCR
4494   [UNSPECV_SET_FPSR UNSPECV_SET_FPCR])
4496 (define_int_attr fpscr_name
4497   [(UNSPECV_GET_FPSR "fpsr")
4498    (UNSPECV_SET_FPSR "fpsr")
4499    (UNSPECV_GET_FPCR "fpcr")
4500    (UNSPECV_SET_FPCR "fpcr")])
4502 (define_int_attr bits_etype [(8 "b") (16 "h") (32 "s") (64 "d")])
4504 ;; Iterators and attributes for faminmax
4506 (define_int_iterator FAMINMAX_UNS [UNSPEC_FAMAX UNSPEC_FAMIN])
4508 (define_int_attr faminmax_cond_uns_op
4509   [(UNSPEC_COND_SMAX "famax") (UNSPEC_COND_SMIN "famin")])
4511 (define_int_attr faminmax_uns_op
4512   [(UNSPEC_FAMAX "famax") (UNSPEC_FAMIN "famin")])
4514 (define_code_attr faminmax_op
4515   [(smax "famax") (smin "famin")])