1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve  2>&1 < %s| FileCheck %s
2
3smax    z0.b, z0.b, #-129
4// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-128, 127].
5// CHECK-NEXT: smax    z0.b, z0.b, #-129
6// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
7
8smax    z31.b, z31.b, #128
9// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-128, 127].
10// CHECK-NEXT: smax    z31.b, z31.b, #128
11// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12
13smax    z0.b, p8/m, z0.b, z0.b
14// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
15// CHECK-NEXT: smax    z0.b, p8/m, z0.b, z0.b
16// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
17
18
19// --------------------------------------------------------------------------//
20// Negative tests for instructions that are incompatible with movprfx
21
22movprfx z31.d, p0/z, z6.d
23smax    z31.d, z31.d, #127
24// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
25// CHECK-NEXT: smax    z31.d, z31.d, #127
26// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
27