1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve2
2>&1 < %s| FileCheck
%s
4 // --------------------------------------------------------------------------//
5 // Invalid result type.
7 stnt1h
{ z0.
b }, p0
, [z0.s
]
8 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
9 // CHECK-NEXT
: stnt1h
{ z0.
b }, p0
, [z0.s
]
10 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
12 stnt1h
{ z0.h
}, p0
, [z0.s
]
13 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
14 // CHECK-NEXT
: stnt1h
{ z0.h
}, p0
, [z0.s
]
15 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
18 // --------------------------------------------------------------------------//
19 // Invalid base vector.
21 stnt1h
{ z0.s
}, p0
, [z0.
b]
22 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
23 // CHECK-NEXT
: stnt1h
{ z0.s
}, p0
, [z0.
b]
24 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
26 stnt1h
{ z0.d
}, p0
, [z0.h
]
27 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
28 // CHECK-NEXT
: stnt1h
{ z0.d
}, p0
, [z0.h
]
29 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid offset type.
35 stnt1h
{ z0.d
}, p0
, [z0.d
, z1.d
]
36 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
37 // CHECK-NEXT
: stnt1h
{ z0.d
}, p0
, [z0.d
, z1.d
]
38 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
41 // --------------------------------------------------------------------------//
42 // restricted predicate has range
[0, 7].
44 stnt1h
{ z27.d
}, p8
, [z0.d
]
45 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
46 // CHECK-NEXT
: stnt1h
{ z27.d
}, p8
, [z0.d
]
47 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
50 // --------------------------------------------------------------------------//
51 // Invalid vector list.
53 stnt1h
{ }, p0
, [z0.d
]
54 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: vector register expected
55 // CHECK-NEXT
: stnt1h
{ }, p0
, [z0.d
]
56 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
58 stnt1h
{ z0.d
, z1.d
}, p0
, [z0.d
]
59 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
60 // CHECK-NEXT
: stnt1h
{ z0.d
, z1.d
}, p0
, [z0.d
]
61 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
63 stnt1h
{ v0.2d
}, p0
, [z0.d
]
64 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
65 // CHECK-NEXT
: stnt1h
{ v0.2d
}, p0
, [z0.d
]
66 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
69 // --------------------------------------------------------------------------//
70 // Negative tests for instructions that are incompatible with movprfx
72 movprfx z0.d
, p0
/z
, z7.d
73 stnt1h
{ z0.d
}, p0
, [z0.d
, x0
]
74 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
75 // CHECK-NEXT
: stnt1h
{ z0.d
}, p0
, [z0.d
, x0
]
76 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
79 stnt1h
{ z0.s
}, p0
, [z0.s
, x0
]
80 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
81 // CHECK-NEXT
: stnt1h
{ z0.s
}, p0
, [z0.s
, x0
]
82 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: