llvm.org GIT mirror llvm / d531475
[AArch64][SVE2] Asm: support SVE2 Narrowing Group Summary: Patch adds support for the following instructions: SVE2 bitwise shift right narrow: * SQSHRUNB, SQSHRUNT, SQRSHRUNB, SQRSHRUNT, SHRNB, SHRNT, RSHRNB, RSHRNT, SQSHRNB, SQSHRNT, SQRSHRNB, SQRSHRNT, UQSHRNB, UQSHRNT, UQRSHRNB, UQRSHRNT SVE2 integer add/subtract narrow high part: * ADDHNB, ADDHNT, RADDHNB, RADDHNT, SUBHNB, SUBHNT, RSUBHNB, RSUBHNT SVE2 saturating extract narrow: * SQXTNB, SQXTNT, UQXTNB, UQXTNT, SQXTUNB, SQXTUNT The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D62205 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361624 91177308-0d34-0410-b5e6-96231b3b80d8 Cullen Rhodes 5 months ago
62 changed file(s) with 2800 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
12271227 defm SBCLB_ZZZ : sve2_int_addsub_long_carry<0b10, "sbclb">;
12281228 defm SBCLT_ZZZ : sve2_int_addsub_long_carry<0b11, "sbclt">;
12291229
1230 // SVE2 bitwise shift right narrow
1231 defm SQSHRUNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0000, "sqshrunb">;
1232 defm SQSHRUNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0001, "sqshrunt">;
1233 defm SQRSHRUNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0010, "sqrshrunb">;
1234 defm SQRSHRUNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0011, "sqrshrunt">;
1235 defm SHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0100, "shrnb">;
1236 defm SHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0101, "shrnt">;
1237 defm RSHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0110, "rshrnb">;
1238 defm RSHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b0111, "rshrnt">;
1239 defm SQSHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1000, "sqshrnb">;
1240 defm SQSHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1001, "sqshrnt">;
1241 defm SQRSHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1010, "sqrshrnb">;
1242 defm SQRSHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1011, "sqrshrnt">;
1243 defm UQSHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1100, "uqshrnb">;
1244 defm UQSHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1101, "uqshrnt">;
1245 defm UQRSHRNB_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1110, "uqrshrnb">;
1246 defm UQRSHRNT_ZZI : sve2_int_bin_cons_shift_imm_right_narrow<0b1111, "uqrshrnt">;
1247
1248 // SVE2 integer add/subtract narrow high part
1249 defm ADDHNB_ZZZ : sve2_int_addsub_narrow_high<0b000, "addhnb">;
1250 defm ADDHNT_ZZZ : sve2_int_addsub_narrow_high<0b001, "addhnt">;
1251 defm RADDHNB_ZZZ : sve2_int_addsub_narrow_high<0b010, "raddhnb">;
1252 defm RADDHNT_ZZZ : sve2_int_addsub_narrow_high<0b011, "raddhnt">;
1253 defm SUBHNB_ZZZ : sve2_int_addsub_narrow_high<0b100, "subhnb">;
1254 defm SUBHNT_ZZZ : sve2_int_addsub_narrow_high<0b101, "subhnt">;
1255 defm RSUBHNB_ZZZ : sve2_int_addsub_narrow_high<0b110, "rsubhnb">;
1256 defm RSUBHNT_ZZZ : sve2_int_addsub_narrow_high<0b111, "rsubhnt">;
1257
1258 // SVE2 saturating extract narrow
1259 defm SQXTNB_ZZ : sve2_int_sat_extract_narrow<0b000, "sqxtnb">;
1260 defm SQXTNT_ZZ : sve2_int_sat_extract_narrow<0b001, "sqxtnt">;
1261 defm UQXTNB_ZZ : sve2_int_sat_extract_narrow<0b010, "uqxtnb">;
1262 defm UQXTNT_ZZ : sve2_int_sat_extract_narrow<0b011, "uqxtnt">;
1263 defm SQXTUNB_ZZ : sve2_int_sat_extract_narrow<0b100, "sqxtunb">;
1264 defm SQXTUNT_ZZ : sve2_int_sat_extract_narrow<0b101, "sqxtunt">;
1265
12301266 // Predicated shifts
12311267 defm SQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0110, "sqshl">;
12321268 defm UQSHL_ZPmI : sve_int_bin_pred_shift_imm_left< 0b0111, "uqshl">;
23472347 }
23482348
23492349 //===----------------------------------------------------------------------===//
2350 // SVE2 Narrowing Group
2351 //===----------------------------------------------------------------------===//
2352
2353 class sve2_int_bin_cons_shift_imm_narrow tsz8_64, bits<4> opc,
2354 string asm, ZPRRegOp zprty1,
2355 ZPRRegOp zprty2, Operand immtype>
2356 : I<(outs zprty1:$Zd), (ins zprty2:$Zn, immtype:$imm),
2357 asm, "\t$Zd, $Zn, $imm",
2358 "", []>, Sched<[]> {
2359 bits<5> Zd;
2360 bits<5> Zn;
2361 bits<5> imm;
2362 let Inst{31-23} = 0b010001010;
2363 let Inst{22} = tsz8_64{2};
2364 let Inst{21} = 0b1;
2365 let Inst{20-19} = tsz8_64{1-0};
2366 let Inst{18-16} = imm{2-0}; // imm3
2367 let Inst{15-14} = 0b00;
2368 let Inst{13-10} = opc;
2369 let Inst{9-5} = Zn;
2370 let Inst{4-0} = Zd;
2371 }
2372
2373 multiclass sve2_int_bin_cons_shift_imm_right_narrow opc, string asm> {
2374 def _B : sve2_int_bin_cons_shift_imm_narrow<{0,0,1}, opc, asm, ZPR8, ZPR16,
2375 vecshiftR8>;
2376 def _H : sve2_int_bin_cons_shift_imm_narrow<{0,1,?}, opc, asm, ZPR16, ZPR32,
2377 vecshiftR16> {
2378 let Inst{19} = imm{3};
2379 }
2380 def _S : sve2_int_bin_cons_shift_imm_narrow<{1,?,?}, opc, asm, ZPR32, ZPR64,
2381 vecshiftR32> {
2382 let Inst{20-19} = imm{4-3};
2383 }
2384 }
2385
2386 class sve2_int_addsub_narrow_high sz, bits<3> opc, string asm,
2387 ZPRRegOp zprty1, ZPRRegOp zprty2>
2388 : I<(outs zprty1:$Zd), (ins zprty2:$Zn, zprty2:$Zm),
2389 asm, "\t$Zd, $Zn, $Zm", "", []>, Sched<[]> {
2390 bits<5> Zd;
2391 bits<5> Zn;
2392 bits<5> Zm;
2393 let Inst{31-24} = 0b01000101;
2394 let Inst{23-22} = sz;
2395 let Inst{21} = 0b1;
2396 let Inst{20-16} = Zm;
2397 let Inst{15-13} = 0b011;
2398 let Inst{12-10} = opc; // S, R, T
2399 let Inst{9-5} = Zn;
2400 let Inst{4-0} = Zd;
2401 }
2402
2403 multiclass sve2_int_addsub_narrow_high opc, string asm> {
2404 def _B : sve2_int_addsub_narrow_high<0b01, opc, asm, ZPR8, ZPR16>;
2405 def _H : sve2_int_addsub_narrow_high<0b10, opc, asm, ZPR16, ZPR32>;
2406 def _S : sve2_int_addsub_narrow_high<0b11, opc, asm, ZPR32, ZPR64>;
2407 }
2408
2409 class sve2_int_sat_extract_narrow tsz8_64, bits<3> opc, string asm,
2410 ZPRRegOp zprty1, ZPRRegOp zprty2>
2411 : I<(outs zprty1:$Zd), (ins zprty2:$Zn),
2412 asm, "\t$Zd, $Zn", "", []>, Sched<[]> {
2413 bits<5> Zd;
2414 bits<5> Zn;
2415 let Inst{31-23} = 0b010001010;
2416 let Inst{22} = tsz8_64{2};
2417 let Inst{21} = 0b1;
2418 let Inst{20-19} = tsz8_64{1-0};
2419 let Inst{18-13} = 0b000010;
2420 let Inst{12-10} = opc;
2421 let Inst{9-5} = Zn;
2422 let Inst{4-0} = Zd;
2423 }
2424
2425 multiclass sve2_int_sat_extract_narrow opc, string asm> {
2426 def _B : sve2_int_sat_extract_narrow<0b001, opc, asm, ZPR8, ZPR16>;
2427 def _H : sve2_int_sat_extract_narrow<0b010, opc, asm, ZPR16, ZPR32>;
2428 def _S : sve2_int_sat_extract_narrow<0b100, opc, asm, ZPR32, ZPR64>;
2429 }
2430
2431 //===----------------------------------------------------------------------===//
23502432 // SVE Integer Arithmetic - Unary Predicated Group
23512433 //===----------------------------------------------------------------------===//
23522434
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 addhnb z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: addhnb z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 addhnb z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: addhnb z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 addhnb z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: addhnb z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 addhnb z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: addhnb z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 addhnb z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: addhnb z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 addhnb z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: addhnb z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 addhnb z0.b, z1.h, z31.h
11 // CHECK-INST: addhnb z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x60,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 60 7f 45
15
16 addhnb z0.h, z1.s, z31.s
17 // CHECK-INST: addhnb z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x60,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 60 bf 45
21
22 addhnb z0.s, z1.d, z31.d
23 // CHECK-INST: addhnb z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x60,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 60 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 addhnt z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: addhnt z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 addhnt z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: addhnt z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 addhnt z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: addhnt z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 addhnt z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: addhnt z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 addhnt z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: addhnt z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 addhnt z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: addhnt z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 addhnt z0.b, z1.h, z31.h
11 // CHECK-INST: addhnt z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x64,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 64 7f 45
15
16 addhnt z0.h, z1.s, z31.s
17 // CHECK-INST: addhnt z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x64,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 64 bf 45
21
22 addhnt z0.s, z1.d, z31.d
23 // CHECK-INST: addhnt z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x64,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 64 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 raddhnb z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: raddhnb z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 raddhnb z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: raddhnb z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 raddhnb z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: raddhnb z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 raddhnb z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: raddhnb z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 raddhnb z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: raddhnb z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 raddhnb z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: raddhnb z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 raddhnb z0.b, z1.h, z31.h
11 // CHECK-INST: raddhnb z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x68,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 68 7f 45
15
16 raddhnb z0.h, z1.s, z31.s
17 // CHECK-INST: raddhnb z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x68,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 68 bf 45
21
22 raddhnb z0.s, z1.d, z31.d
23 // CHECK-INST: raddhnb z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x68,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 68 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 raddhnt z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: raddhnt z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 raddhnt z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: raddhnt z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 raddhnt z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: raddhnt z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 raddhnt z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: raddhnt z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 raddhnt z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: raddhnt z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 raddhnt z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: raddhnt z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 raddhnt z0.b, z1.h, z31.h
11 // CHECK-INST: raddhnt z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x6c,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 6c 7f 45
15
16 raddhnt z0.h, z1.s, z31.s
17 // CHECK-INST: raddhnt z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x6c,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 6c bf 45
21
22 raddhnt z0.s, z1.d, z31.d
23 // CHECK-INST: raddhnt z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x6c,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 6c ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 rshrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: rshrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 rshrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: rshrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 rshrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: rshrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 rshrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: rshrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 rshrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: rshrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 rshrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: rshrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 rshrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: rshrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 rshrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: rshrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 rshrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: rshrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 rshrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: rshrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 rshrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: rshrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 rshrnb z0.b, z0.h, #1
10 // CHECK-INST: rshrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x18,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 18 2f 45
14
15 rshrnb z31.b, z31.h, #8
16 // CHECK-INST: rshrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x1b,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 1b 28 45
20
21 rshrnb z0.h, z0.s, #1
22 // CHECK-INST: rshrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x18,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 18 3f 45
26
27 rshrnb z31.h, z31.s, #16
28 // CHECK-INST: rshrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x1b,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 1b 30 45
32
33 rshrnb z0.s, z0.d, #1
34 // CHECK-INST: rshrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x18,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 18 7f 45
38
39 rshrnb z31.s, z31.d, #32
40 // CHECK-INST: rshrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x1b,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 1b 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 rshrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: rshrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 rshrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: rshrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 rshrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: rshrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 rshrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: rshrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 rshrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: rshrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 rshrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: rshrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 rshrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: rshrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 rshrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: rshrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 rshrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: rshrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 rshrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: rshrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 rshrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: rshrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 rshrnt z0.b, z0.h, #1
10 // CHECK-INST: rshrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x1c,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 1c 2f 45
14
15 rshrnt z31.b, z31.h, #8
16 // CHECK-INST: rshrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x1f,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 1f 28 45
20
21 rshrnt z0.h, z0.s, #1
22 // CHECK-INST: rshrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x1c,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 1c 3f 45
26
27 rshrnt z31.h, z31.s, #16
28 // CHECK-INST: rshrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x1f,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 1f 30 45
32
33 rshrnt z0.s, z0.d, #1
34 // CHECK-INST: rshrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x1c,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 1c 7f 45
38
39 rshrnt z31.s, z31.d, #32
40 // CHECK-INST: rshrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x1f,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 1f 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 rsubhnb z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: rsubhnb z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 rsubhnb z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: rsubhnb z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 rsubhnb z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: rsubhnb z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 rsubhnb z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: rsubhnb z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 rsubhnb z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: rsubhnb z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 rsubhnb z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: rsubhnb z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 rsubhnb z0.b, z1.h, z31.h
11 // CHECK-INST: rsubhnb z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x78,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 78 7f 45
15
16 rsubhnb z0.h, z1.s, z31.s
17 // CHECK-INST: rsubhnb z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x78,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 78 bf 45
21
22 rsubhnb z0.s, z1.d, z31.d
23 // CHECK-INST: rsubhnb z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x78,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 78 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 rsubhnt z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: rsubhnt z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 rsubhnt z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: rsubhnt z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 rsubhnt z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: rsubhnt z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 rsubhnt z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: rsubhnt z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 rsubhnt z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: rsubhnt z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 rsubhnt z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: rsubhnt z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 rsubhnt z0.b, z1.h, z31.h
11 // CHECK-INST: rsubhnt z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x7c,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 7c 7f 45
15
16 rsubhnt z0.h, z1.s, z31.s
17 // CHECK-INST: rsubhnt z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x7c,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 7c bf 45
21
22 rsubhnt z0.s, z1.d, z31.d
23 // CHECK-INST: rsubhnt z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x7c,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 7c ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 shrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: shrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 shrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: shrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 shrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: shrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 shrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: shrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 shrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: shrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 shrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: shrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 shrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: shrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 shrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: shrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 shrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: shrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 shrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: shrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 shrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: shrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 shrnb z0.b, z0.h, #1
10 // CHECK-INST: shrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x10,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 10 2f 45
14
15 shrnb z31.b, z31.h, #8
16 // CHECK-INST: shrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x13,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 13 28 45
20
21 shrnb z0.h, z0.s, #1
22 // CHECK-INST: shrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x10,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 10 3f 45
26
27 shrnb z31.h, z31.s, #16
28 // CHECK-INST: shrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x13,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 13 30 45
32
33 shrnb z0.s, z0.d, #1
34 // CHECK-INST: shrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x10,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 10 7f 45
38
39 shrnb z31.s, z31.d, #32
40 // CHECK-INST: shrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x13,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 13 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 shrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: shrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 shrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: shrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 shrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: shrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 shrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: shrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 shrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: shrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 shrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: shrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 shrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: shrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 shrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: shrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 shrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: shrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 shrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: shrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 shrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: shrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 shrnt z0.b, z0.h, #1
10 // CHECK-INST: shrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x14,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 14 2f 45
14
15 shrnt z31.b, z31.h, #8
16 // CHECK-INST: shrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x17,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 17 28 45
20
21 shrnt z0.h, z0.s, #1
22 // CHECK-INST: shrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x14,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 14 3f 45
26
27 shrnt z31.h, z31.s, #16
28 // CHECK-INST: shrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x17,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 17 30 45
32
33 shrnt z0.s, z0.d, #1
34 // CHECK-INST: shrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x14,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 14 7f 45
38
39 shrnt z31.s, z31.d, #32
40 // CHECK-INST: shrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x17,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 17 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqrshrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqrshrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqrshrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqrshrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqrshrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqrshrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqrshrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqrshrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqrshrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqrshrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqrshrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqrshrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqrshrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqrshrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqrshrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqrshrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqrshrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqrshrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqrshrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqrshrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqrshrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqrshrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqrshrnb z0.b, z0.h, #1
10 // CHECK-INST: sqrshrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x28,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 28 2f 45
14
15 sqrshrnb z31.b, z31.h, #8
16 // CHECK-INST: sqrshrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x2b,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 2b 28 45
20
21 sqrshrnb z0.h, z0.s, #1
22 // CHECK-INST: sqrshrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x28,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 28 3f 45
26
27 sqrshrnb z31.h, z31.s, #16
28 // CHECK-INST: sqrshrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x2b,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 2b 30 45
32
33 sqrshrnb z0.s, z0.d, #1
34 // CHECK-INST: sqrshrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x28,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 28 7f 45
38
39 sqrshrnb z31.s, z31.d, #32
40 // CHECK-INST: sqrshrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x2b,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 2b 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqrshrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqrshrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqrshrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqrshrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqrshrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqrshrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqrshrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqrshrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqrshrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqrshrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqrshrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqrshrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqrshrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqrshrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqrshrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqrshrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqrshrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqrshrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqrshrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqrshrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqrshrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqrshrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqrshrnt z0.b, z0.h, #1
10 // CHECK-INST: sqrshrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x2c,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 2c 2f 45
14
15 sqrshrnt z31.b, z31.h, #8
16 // CHECK-INST: sqrshrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x2f,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 2f 28 45
20
21 sqrshrnt z0.h, z0.s, #1
22 // CHECK-INST: sqrshrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x2c,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 2c 3f 45
26
27 sqrshrnt z31.h, z31.s, #16
28 // CHECK-INST: sqrshrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x2f,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 2f 30 45
32
33 sqrshrnt z0.s, z0.d, #1
34 // CHECK-INST: sqrshrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x2c,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 2c 7f 45
38
39 sqrshrnt z31.s, z31.d, #32
40 // CHECK-INST: sqrshrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x2f,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 2f 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqrshrunb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqrshrunb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqrshrunb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqrshrunb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqrshrunb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqrshrunb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqrshrunb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqrshrunb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqrshrunb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqrshrunb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqrshrunb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqrshrunb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqrshrunb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqrshrunb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqrshrunb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqrshrunb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqrshrunb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqrshrunb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqrshrunb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqrshrunb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqrshrunb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqrshrunb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqrshrunb z0.b, z0.h, #1
10 // CHECK-INST: sqrshrunb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x08,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 08 2f 45
14
15 sqrshrunb z31.b, z31.h, #8
16 // CHECK-INST: sqrshrunb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x0b,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 0b 28 45
20
21 sqrshrunb z0.h, z0.s, #1
22 // CHECK-INST: sqrshrunb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x08,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 08 3f 45
26
27 sqrshrunb z31.h, z31.s, #16
28 // CHECK-INST: sqrshrunb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x0b,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 0b 30 45
32
33 sqrshrunb z0.s, z0.d, #1
34 // CHECK-INST: sqrshrunb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x08,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 08 7f 45
38
39 sqrshrunb z31.s, z31.d, #32
40 // CHECK-INST: sqrshrunb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x0b,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 0b 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqrshrunt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqrshrunt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqrshrunt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqrshrunt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqrshrunt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqrshrunt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqrshrunt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqrshrunt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqrshrunt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqrshrunt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqrshrunt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqrshrunt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqrshrunt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqrshrunt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqrshrunt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqrshrunt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqrshrunt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqrshrunt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqrshrunt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqrshrunt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqrshrunt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqrshrunt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqrshrunt z0.b, z0.h, #1
10 // CHECK-INST: sqrshrunt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x0c,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 0c 2f 45
14
15 sqrshrunt z31.b, z31.h, #8
16 // CHECK-INST: sqrshrunt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x0f,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 0f 28 45
20
21 sqrshrunt z0.h, z0.s, #1
22 // CHECK-INST: sqrshrunt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x0c,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 0c 3f 45
26
27 sqrshrunt z31.h, z31.s, #16
28 // CHECK-INST: sqrshrunt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x0f,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 0f 30 45
32
33 sqrshrunt z0.s, z0.d, #1
34 // CHECK-INST: sqrshrunt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x0c,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 0c 7f 45
38
39 sqrshrunt z31.s, z31.d, #32
40 // CHECK-INST: sqrshrunt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x0f,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 0f 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqshrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqshrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqshrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqshrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqshrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqshrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqshrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqshrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqshrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqshrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqshrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqshrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqshrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqshrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqshrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqshrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqshrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqshrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqshrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqshrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqshrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqshrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqshrnb z0.b, z0.h, #1
10 // CHECK-INST: sqshrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x20,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 20 2f 45
14
15 sqshrnb z31.b, z31.h, #8
16 // CHECK-INST: sqshrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x23,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 23 28 45
20
21 sqshrnb z0.h, z0.s, #1
22 // CHECK-INST: sqshrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x20,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 20 3f 45
26
27 sqshrnb z31.h, z31.s, #16
28 // CHECK-INST: sqshrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x23,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 23 30 45
32
33 sqshrnb z0.s, z0.d, #1
34 // CHECK-INST: sqshrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x20,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 20 7f 45
38
39 sqshrnb z31.s, z31.d, #32
40 // CHECK-INST: sqshrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x23,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 23 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqshrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqshrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqshrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqshrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqshrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqshrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqshrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqshrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqshrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqshrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqshrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqshrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqshrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqshrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqshrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqshrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqshrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqshrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqshrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqshrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqshrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqshrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqshrnt z0.b, z0.h, #1
10 // CHECK-INST: sqshrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x24,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 24 2f 45
14
15 sqshrnt z31.b, z31.h, #8
16 // CHECK-INST: sqshrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x27,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 27 28 45
20
21 sqshrnt z0.h, z0.s, #1
22 // CHECK-INST: sqshrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x24,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 24 3f 45
26
27 sqshrnt z31.h, z31.s, #16
28 // CHECK-INST: sqshrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x27,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 27 30 45
32
33 sqshrnt z0.s, z0.d, #1
34 // CHECK-INST: sqshrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x24,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 24 7f 45
38
39 sqshrnt z31.s, z31.d, #32
40 // CHECK-INST: sqshrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x27,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 27 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqshrunb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqshrunb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqshrunb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqshrunb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqshrunb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqshrunb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqshrunb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqshrunb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqshrunb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqshrunb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqshrunb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqshrunb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqshrunb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqshrunb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqshrunb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqshrunb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqshrunb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqshrunb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqshrunb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqshrunb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqshrunb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqshrunb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqshrunb z0.b, z0.h, #1
10 // CHECK-INST: sqshrunb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x00,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 00 2f 45
14
15 sqshrunb z31.b, z31.h, #8
16 // CHECK-INST: sqshrunb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x03,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 03 28 45
20
21 sqshrunb z0.h, z0.s, #1
22 // CHECK-INST: sqshrunb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x00,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 00 3f 45
26
27 sqshrunb z31.h, z31.s, #16
28 // CHECK-INST: sqshrunb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x03,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 03 30 45
32
33 sqshrunb z0.s, z0.d, #1
34 // CHECK-INST: sqshrunb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x00,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 00 7f 45
38
39 sqshrunb z31.s, z31.d, #32
40 // CHECK-INST: sqshrunb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x03,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 03 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 sqshrunt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: sqshrunt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 sqshrunt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: sqshrunt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 sqshrunt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: sqshrunt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 sqshrunt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: sqshrunt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 sqshrunt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: sqshrunt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 sqshrunt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: sqshrunt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 sqshrunt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: sqshrunt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 sqshrunt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: sqshrunt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 sqshrunt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: sqshrunt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 sqshrunt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: sqshrunt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 sqshrunt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: sqshrunt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 sqshrunt z0.b, z0.h, #1
10 // CHECK-INST: sqshrunt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x04,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 04 2f 45
14
15 sqshrunt z31.b, z31.h, #8
16 // CHECK-INST: sqshrunt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x07,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 07 28 45
20
21 sqshrunt z0.h, z0.s, #1
22 // CHECK-INST: sqshrunt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x04,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 04 3f 45
26
27 sqshrunt z31.h, z31.s, #16
28 // CHECK-INST: sqshrunt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x07,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 07 30 45
32
33 sqshrunt z0.s, z0.d, #1
34 // CHECK-INST: sqshrunt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x04,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 04 7f 45
38
39 sqshrunt z31.s, z31.d, #32
40 // CHECK-INST: sqshrunt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x07,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 07 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 sqxtnb z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: sqxtnb z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 sqxtnb z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: sqxtnb z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 sqxtnb z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: sqxtnb z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 sqxtnb z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: sqxtnb z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 sqxtnb z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: sqxtnb z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 sqxtnb z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: sqxtnb z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 sqxtnb z0.b, z31.h
11 // CHECK-INST: sqxtnb z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x43,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 43 28 45
15
16 sqxtnb z0.h, z31.s
17 // CHECK-INST: sqxtnb z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x43,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 43 30 45
21
22 sqxtnb z0.s, z31.d
23 // CHECK-INST: sqxtnb z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x43,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 43 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 sqxtnt z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: sqxtnt z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 sqxtnt z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: sqxtnt z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 sqxtnt z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: sqxtnt z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 sqxtnt z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: sqxtnt z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 sqxtnt z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: sqxtnt z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 sqxtnt z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: sqxtnt z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 sqxtnt z0.b, z31.h
11 // CHECK-INST: sqxtnt z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x47,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 47 28 45
15
16 sqxtnt z0.h, z31.s
17 // CHECK-INST: sqxtnt z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x47,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 47 30 45
21
22 sqxtnt z0.s, z31.d
23 // CHECK-INST: sqxtnt z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x47,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 47 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 sqxtunb z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: sqxtunb z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 sqxtunb z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: sqxtunb z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 sqxtunb z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: sqxtunb z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 sqxtunb z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: sqxtunb z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 sqxtunb z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: sqxtunb z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 sqxtunb z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: sqxtunb z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 sqxtunb z0.b, z31.h
11 // CHECK-INST: sqxtunb z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x53,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 53 28 45
15
16 sqxtunb z0.h, z31.s
17 // CHECK-INST: sqxtunb z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x53,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 53 30 45
21
22 sqxtunb z0.s, z31.d
23 // CHECK-INST: sqxtunb z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x53,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 53 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 sqxtunt z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: sqxtunt z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 sqxtunt z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: sqxtunt z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 sqxtunt z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: sqxtunt z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 sqxtunt z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: sqxtunt z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 sqxtunt z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: sqxtunt z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 sqxtunt z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: sqxtunt z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 sqxtunt z0.b, z31.h
11 // CHECK-INST: sqxtunt z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x57,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 57 28 45
15
16 sqxtunt z0.h, z31.s
17 // CHECK-INST: sqxtunt z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x57,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 57 30 45
21
22 sqxtunt z0.s, z31.d
23 // CHECK-INST: sqxtunt z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x57,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 57 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 subhnb z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: subhnb z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 subhnb z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: subhnb z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 subhnb z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: subhnb z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 subhnb z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: subhnb z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 subhnb z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: subhnb z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 subhnb z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: subhnb z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 subhnb z0.b, z1.h, z31.h
11 // CHECK-INST: subhnb z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x70,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 70 7f 45
15
16 subhnb z0.h, z1.s, z31.s
17 // CHECK-INST: subhnb z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x70,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 70 bf 45
21
22 subhnb z0.s, z1.d, z31.d
23 // CHECK-INST: subhnb z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x70,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 70 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 subhnt z0.b, z1.b, z2.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: subhnt z0.b, z1.b, z2.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 subhnt z0.h, z1.h, z2.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: subhnt z0.h, z1.h, z2.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 subhnt z0.s, z1.s, z2.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: subhnt z0.s, z1.s, z2.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 subhnt z0.d, z1.d, z2.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: subhnt z0.d, z1.d, z2.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 subhnt z0.s, z1.d, z31.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: subhnt z0.s, z1.d, z31.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 subhnt z0.s, z1.d, z31.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: subhnt z0.s, z1.d, z31.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 subhnt z0.b, z1.h, z31.h
11 // CHECK-INST: subhnt z0.b, z1.h, z31.h
12 // CHECK-ENCODING: [0x20,0x74,0x7f,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: 20 74 7f 45
15
16 subhnt z0.h, z1.s, z31.s
17 // CHECK-INST: subhnt z0.h, z1.s, z31.s
18 // CHECK-ENCODING: [0x20,0x74,0xbf,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: 20 74 bf 45
21
22 subhnt z0.s, z1.d, z31.d
23 // CHECK-INST: subhnt z0.s, z1.d, z31.d
24 // CHECK-ENCODING: [0x20,0x74,0xff,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: 20 74 ff 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 uqrshrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: uqrshrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 uqrshrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: uqrshrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 uqrshrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: uqrshrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 uqrshrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: uqrshrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 uqrshrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: uqrshrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 uqrshrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: uqrshrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 uqrshrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: uqrshrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 uqrshrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: uqrshrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 uqrshrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: uqrshrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 uqrshrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: uqrshrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 uqrshrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: uqrshrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 uqrshrnb z0.b, z0.h, #1
10 // CHECK-INST: uqrshrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x38,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 38 2f 45
14
15 uqrshrnb z31.b, z31.h, #8
16 // CHECK-INST: uqrshrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x3b,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 3b 28 45
20
21 uqrshrnb z0.h, z0.s, #1
22 // CHECK-INST: uqrshrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x38,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 38 3f 45
26
27 uqrshrnb z31.h, z31.s, #16
28 // CHECK-INST: uqrshrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x3b,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 3b 30 45
32
33 uqrshrnb z0.s, z0.d, #1
34 // CHECK-INST: uqrshrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x38,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 38 7f 45
38
39 uqrshrnb z31.s, z31.d, #32
40 // CHECK-INST: uqrshrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x3b,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 3b 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 uqrshrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: uqrshrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 uqrshrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: uqrshrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 uqrshrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: uqrshrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 uqrshrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: uqrshrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 uqrshrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: uqrshrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 uqrshrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: uqrshrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 uqrshrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: uqrshrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 uqrshrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: uqrshrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 uqrshrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: uqrshrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 uqrshrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: uqrshrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 uqrshrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: uqrshrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 uqrshrnt z0.b, z0.h, #1
10 // CHECK-INST: uqrshrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x3c,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 3c 2f 45
14
15 uqrshrnt z31.b, z31.h, #8
16 // CHECK-INST: uqrshrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x3f,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 3f 28 45
20
21 uqrshrnt z0.h, z0.s, #1
22 // CHECK-INST: uqrshrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x3c,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 3c 3f 45
26
27 uqrshrnt z31.h, z31.s, #16
28 // CHECK-INST: uqrshrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x3f,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 3f 30 45
32
33 uqrshrnt z0.s, z0.d, #1
34 // CHECK-INST: uqrshrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x3c,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 3c 7f 45
38
39 uqrshrnt z31.s, z31.d, #32
40 // CHECK-INST: uqrshrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x3f,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 3f 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 uqshrnb z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: uqshrnb z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 uqshrnb z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: uqshrnb z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 uqshrnb z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: uqshrnb z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 uqshrnb z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: uqshrnb z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 uqshrnb z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: uqshrnb z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 uqshrnb z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: uqshrnb z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 uqshrnb z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: uqshrnb z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 uqshrnb z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: uqshrnb z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 uqshrnb z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: uqshrnb z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 uqshrnb z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: uqshrnb z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 uqshrnb z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: uqshrnb z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 uqshrnb z0.b, z0.h, #1
10 // CHECK-INST: uqshrnb z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x30,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 30 2f 45
14
15 uqshrnb z31.b, z31.h, #8
16 // CHECK-INST: uqshrnb z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x33,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 33 28 45
20
21 uqshrnb z0.h, z0.s, #1
22 // CHECK-INST: uqshrnb z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x30,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 30 3f 45
26
27 uqshrnb z31.h, z31.s, #16
28 // CHECK-INST: uqshrnb z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x33,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 33 30 45
32
33 uqshrnb z0.s, z0.d, #1
34 // CHECK-INST: uqshrnb z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x30,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 30 7f 45
38
39 uqshrnb z31.s, z31.d, #32
40 // CHECK-INST: uqshrnb z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x33,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 33 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2 uqshrnt z30.b, z10.h, #0
3 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
4 // CHECK-NEXT: uqshrnt z30.b, z10.h, #0
5 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
6
7 uqshrnt z18.b, z27.h, #9
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
9 // CHECK-NEXT: uqshrnt z18.b, z27.h, #9
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 uqshrnt z26.h, z4.s, #0
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
14 // CHECK-NEXT: uqshrnt z26.h, z4.s, #0
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17 uqshrnt z25.h, z10.s, #17
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
19 // CHECK-NEXT: uqshrnt z25.h, z10.s, #17
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22 uqshrnt z17.s, z0.d, #0
23 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
24 // CHECK-NEXT: uqshrnt z17.s, z0.d, #0
25 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27 uqshrnt z0.s, z15.d, #33
28 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
29 // CHECK-NEXT: uqshrnt z0.s, z15.d, #33
30 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32
33 // --------------------------------------------------------------------------//
34 // Invalid element width
35
36 uqshrnt z0.b, z0.b, #1
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: uqshrnt z0.b, z0.b, #1
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
40
41 uqshrnt z0.h, z0.h, #1
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: uqshrnt z0.h, z0.h, #1
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46 uqshrnt z0.s, z0.s, #1
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: uqshrnt z0.s, z0.s, #1
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50
51 uqshrnt z0.d, z0.d, #1
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: uqshrnt z0.d, z0.d, #1
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55
56
57 // --------------------------------------------------------------------------//
58 // Negative tests for instructions that are incompatible with movprfx
59
60 movprfx z31, z6
61 uqshrnt z31.s, z31.d, #32
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
63 // CHECK-NEXT: uqshrnt z31.s, z31.d, #32
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9 uqshrnt z0.b, z0.h, #1
10 // CHECK-INST: uqshrnt z0.b, z0.h, #1
11 // CHECK-ENCODING: [0x00,0x34,0x2f,0x45]
12 // CHECK-ERROR: instruction requires: sve2
13 // CHECK-UNKNOWN: 00 34 2f 45
14
15 uqshrnt z31.b, z31.h, #8
16 // CHECK-INST: uqshrnt z31.b, z31.h, #8
17 // CHECK-ENCODING: [0xff,0x37,0x28,0x45]
18 // CHECK-ERROR: instruction requires: sve2
19 // CHECK-UNKNOWN: ff 37 28 45
20
21 uqshrnt z0.h, z0.s, #1
22 // CHECK-INST: uqshrnt z0.h, z0.s, #1
23 // CHECK-ENCODING: [0x00,0x34,0x3f,0x45]
24 // CHECK-ERROR: instruction requires: sve2
25 // CHECK-UNKNOWN: 00 34 3f 45
26
27 uqshrnt z31.h, z31.s, #16
28 // CHECK-INST: uqshrnt z31.h, z31.s, #16
29 // CHECK-ENCODING: [0xff,0x37,0x30,0x45]
30 // CHECK-ERROR: instruction requires: sve2
31 // CHECK-UNKNOWN: ff 37 30 45
32
33 uqshrnt z0.s, z0.d, #1
34 // CHECK-INST: uqshrnt z0.s, z0.d, #1
35 // CHECK-ENCODING: [0x00,0x34,0x7f,0x45]
36 // CHECK-ERROR: instruction requires: sve2
37 // CHECK-UNKNOWN: 00 34 7f 45
38
39 uqshrnt z31.s, z31.d, #32
40 // CHECK-INST: uqshrnt z31.s, z31.d, #32
41 // CHECK-ENCODING: [0xff,0x37,0x60,0x45]
42 // CHECK-ERROR: instruction requires: sve2
43 // CHECK-UNKNOWN: ff 37 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 uqxtnb z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: uqxtnb z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 uqxtnb z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: uqxtnb z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 uqxtnb z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: uqxtnb z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 uqxtnb z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: uqxtnb z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 uqxtnb z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: uqxtnb z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 uqxtnb z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: uqxtnb z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 uqxtnb z0.b, z31.h
11 // CHECK-INST: uqxtnb z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x4b,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 4b 28 45
15
16 uqxtnb z0.h, z31.s
17 // CHECK-INST: uqxtnb z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x4b,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 4b 30 45
21
22 uqxtnb z0.s, z31.d
23 // CHECK-INST: uqxtnb z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x4b,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 4b 60 45
0 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
1
2
3 // ------------------------------------------------------------------------- //
4 // Invalid element width
5
6 uqxtnt z0.b, z1.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
8 // CHECK-NEXT: uqxtnt z0.b, z1.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11 uqxtnt z0.h, z1.h
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
13 // CHECK-NEXT: uqxtnt z0.h, z1.h
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16 uqxtnt z0.s, z1.s
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18 // CHECK-NEXT: uqxtnt z0.s, z1.s
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21 uqxtnt z0.d, z1.d
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: uqxtnt z0.d, z1.d
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26 // --------------------------------------------------------------------------//
27 // Negative tests for instructions that are incompatible with movprfx
28
29 movprfx z0, z7
30 uqxtnt z0.s, z1.d
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
32 // CHECK-NEXT: uqxtnt z0.s, z1.d
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35 movprfx z0.s, p0/z, z7.s
36 uqxtnt z0.s, z1.d
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
38 // CHECK-NEXT: uqxtnt z0.s, z1.d
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
0 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
1 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
2 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
3 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
4 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
5 // RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
6 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
7 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
8
9
10 uqxtnt z0.b, z31.h
11 // CHECK-INST: uqxtnt z0.b, z31.h
12 // CHECK-ENCODING: [0xe0,0x4f,0x28,0x45]
13 // CHECK-ERROR: instruction requires: sve2
14 // CHECK-UNKNOWN: e0 4f 28 45
15
16 uqxtnt z0.h, z31.s
17 // CHECK-INST: uqxtnt z0.h, z31.s
18 // CHECK-ENCODING: [0xe0,0x4f,0x30,0x45]
19 // CHECK-ERROR: instruction requires: sve2
20 // CHECK-UNKNOWN: e0 4f 30 45
21
22 uqxtnt z0.s, z31.d
23 // CHECK-INST: uqxtnt z0.s, z31.d
24 // CHECK-ENCODING: [0xe0,0x4f,0x60,0x45]
25 // CHECK-ERROR: instruction requires: sve2
26 // CHECK-UNKNOWN: e0 4f 60 45