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