1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
3 // --------------------------------------------------------------------------//
4 // Immediate out of lower bound
[-8, 7].
6 ldnt1d z23.d
, p0
/z
, [x13
, #-9, MUL VL]
7 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be an integer in range
[-8, 7].
8 // CHECK-NEXT
: ldnt1d z23.d
, p0
/z
, [x13
, #-9, MUL VL]
9 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
11 ldnt1d z29.d
, p0
/z
, [x3
, #8, MUL VL]
12 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: index must
be an integer in range
[-8, 7].
13 // CHECK-NEXT
: ldnt1d z29.d
, p0
/z
, [x3
, #8, MUL VL]
14 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
17 // --------------------------------------------------------------------------//
18 // Invalid result type.
20 ldnt1d z0.
b, p0
/z
, [x0
]
21 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
22 // CHECK-NEXT
: ldnt1d z0.
b, p0
/z
, [x0
]
23 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
25 ldnt1d z0.h
, p0
/z
, [x0
]
26 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
27 // CHECK-NEXT
: ldnt1d z0.h
, p0
/z
, [x0
]
28 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
30 ldnt1d z0.s
, p0
/z
, [x0
]
31 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
32 // CHECK-NEXT
: ldnt1d z0.s
, p0
/z
, [x0
]
33 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
36 // --------------------------------------------------------------------------//
37 // restricted predicate has range
[0, 7].
39 ldnt1d z27.d
, p8
/z
, [x0
]
40 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
41 // CHECK-NEXT
: ldnt1d z27.d
, p8
/z
, [x0
]
42 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
45 // --------------------------------------------------------------------------//
46 // Invalid vector list.
48 ldnt1d
{ }, p0
/z
, [x1
, #1, MUL VL]
49 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: vector register expected
50 // CHECK-NEXT
: ldnt1d
{ }, p0
/z
, [x1
, #1, MUL VL]
51 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
53 ldnt1d
{ z1.d
, z2.d
}, p0
/z
, [x1
, #1, MUL VL]
54 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand
55 // CHECK-NEXT
: ldnt1d
{ z1.d
, z2.d
}, p0
/z
, [x1
, #1, MUL VL]
56 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
58 ldnt1d
{ v0.2d
}, p0
/z
, [x1
, #1, MUL VL]
59 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand
60 // CHECK-NEXT
: ldnt1d
{ v0.2d
}, p0
/z
, [x1
, #1, MUL VL]
61 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
64 // --------------------------------------------------------------------------//
65 // Negative tests for instructions that are incompatible with movprfx
67 movprfx z0.d
, p0
/z
, z7.d
68 ldnt1d
{ z0.d
}, p0
/z
, [x0
, x0
, lsl
#3]
69 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
70 // CHECK-NEXT
: ldnt1d
{ z0.d
}, p0
/z
, [x0
, x0
, lsl
#3]
71 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
74 ldnt1d
{ z0.d
}, p0
/z
, [x0
, x0
, lsl
#3]
75 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
76 // CHECK-NEXT
: ldnt1d
{ z0.d
}, p0
/z
, [x0
, x0
, lsl
#3]
77 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: