1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
3 // --------------------------------------------------------------------------//
4 // Invalid immediate
(multiple of
4 in range
[0, 252]).
6 ld1rd z0.d
, p1
/z
, [x0
, #-8]
7 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be a multiple of
8 in range
[0, 504].
8 // CHECK-NEXT
: ld1rd z0.d
, p1
/z
, [x0
, #-8]
9 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
11 ld1rd z0.d
, p1
/z
, [x0
, #-1]
12 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be a multiple of
8 in range
[0, 504].
13 // CHECK-NEXT
: ld1rd z0.d
, p1
/z
, [x0
, #-1]
14 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
16 ld1rd z0.d
, p1
/z
, [x0
, #505]
17 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be a multiple of
8 in range
[0, 504].
18 // CHECK-NEXT
: ld1rd z0.d
, p1
/z
, [x0
, #505]
19 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
21 ld1rd z0.d
, p1
/z
, [x0
, #512]
22 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be a multiple of
8 in range
[0, 504].
23 // CHECK-NEXT
: ld1rd z0.d
, p1
/z
, [x0
, #512]
24 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
26 ld1rd z0.d
, p1
/z
, [x0
, #3]
27 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be a multiple of
8 in range
[0, 504].
28 // CHECK-NEXT
: ld1rd z0.d
, p1
/z
, [x0
, #3]
29 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid result vector element size
35 ld1rd z0.
b, p1
/z
, [x0
]
36 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
37 // CHECK-NEXT
: ld1rd z0.
b, p1
/z
, [x0
]
38 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
40 ld1rd z0.h
, p1
/z
, [x0
]
41 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
42 // CHECK-NEXT
: ld1rd z0.h
, p1
/z
, [x0
]
43 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
45 ld1rd z0.s
, p1
/z
, [x0
]
46 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
47 // CHECK-NEXT
: ld1rd z0.s
, p1
/z
, [x0
]
48 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
51 // --------------------------------------------------------------------------//
52 // restricted predicate has range
[0, 7].
54 ld1rd z0.d
, p8
/z
, [x0
]
55 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
56 // CHECK-NEXT
: ld1rd z0.d
, p8
/z
, [x0
]
57 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
60 // --------------------------------------------------------------------------//
61 // Negative tests for instructions that are incompatible with movprfx
63 movprfx z31.d
, p7
/z
, z6.d
64 ld1rd
{ z31.d
}, p7
/z
, [sp
, #504]
65 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
66 // CHECK-NEXT
: ld1rd
{ z31.d
}, p7
/z
, [sp
, #504]
67 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
70 ld1rd
{ z31.d
}, p7
/z
, [sp
, #504]
71 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
72 // CHECK-NEXT
: ld1rd
{ z31.d
}, p7
/z
, [sp
, #504]
73 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: