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