[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE2 / xar-diagnostics.s
blobd675f0a1920c6eee25fe1b21b7221774e03e70da
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
3 xar z30.b, z30.b, z10.b, #0
4 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
5 // CHECK-NEXT: xar z30.b, z30.b, z10.b, #0
6 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
8 xar z18.b, z18.b, z27.b, #9
9 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 8]
10 // CHECK-NEXT: xar z18.b, z18.b, z27.b, #9
11 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
13 xar z26.h, z26.h, z4.h, #0
14 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
15 // CHECK-NEXT: xar z26.h, z26.h, z4.h, #0
16 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 xar z25.h, z25.h, z10.h, #17
19 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
20 // CHECK-NEXT: xar z25.h, z25.h, z10.h, #17
21 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23 xar z17.s, z17.s, z0.s, #0
24 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
25 // CHECK-NEXT: xar z17.s, z17.s, z0.s, #0
26 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
28 xar z0.s, z0.s, z15.s, #33
29 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 32]
30 // CHECK-NEXT: xar z0.s, z0.s, z15.s, #33
31 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
33 xar z4.d, z4.d, z13.d, #0
34 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 64]
35 // CHECK-NEXT: xar z4.d, z4.d, z13.d, #0
36 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
38 xar z26.d, z26.d, z26.d, #65
39 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 64]
40 // CHECK-NEXT: xar z26.d, z26.d, z26.d, #65
41 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 // --------------------------------------------------------------------------//
45 // Element sizes must match
47 xar z0.b, z0.b , z0.d, #1
48 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
49 // CHECK-NEXT: xar z0.b, z0.b , z0.d, #1
50 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
53 // --------------------------------------------------------------------------//
54 // Negative tests for instructions that are incompatible with movprfx
56 movprfx z0.d, p0/z, z7.d
57 xar z0.d, z0.d, z1.d, #1
58 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
59 // CHECK-NEXT: xar z0.d, z0.d, z1.d, #1
60 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: