[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / AArch64 / SVE2 / match-diagnostics.s
blobd123d2ef25d2858a6c3aaaefda87d2d30bc93d7f
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Restricted predicate out of range.
6 match p0.b, p8/z, z0.b, z0.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
8 // CHECK-NEXT: match p0.b, p8/z, z0.b, z0.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 // --------------------------------------------------------------------------//
13 // Invalid predicate operation
15 match p0.b, p0/m, z0.b, z0.b
16 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
17 // CHECK-NEXT: match p0.b, p0/m, z0.b, z0.b
18 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 // --------------------------------------------------------------------------//
22 // Invalid destination predicate register
24 match p0.s, p0/z, z0.b, z0.b
25 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register.
26 // CHECK-NEXT: match p0.s, p0/z, z0.b, z0.b
27 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29 match p0.d, p0/z, z0.b, z0.b
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register.
31 // CHECK-NEXT: match p0.d, p0/z, z0.b, z0.b
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 // --------------------------------------------------------------------------//
35 // Invalid element width
37 match p0.b, p0/z, z0.s, z0.s
38 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
39 // CHECK-NEXT: match p0.b, p0/z, z0.s, z0.s
40 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
42 match p0.b, p0/z, z0.d, z0.d
43 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
44 // CHECK-NEXT: match p0.b, p0/z, z0.d, z0.d
45 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
48 // --------------------------------------------------------------------------//
49 // Negative tests for instructions that are incompatible with movprfx
51 movprfx z0.b, p0/z, z7.b
52 match p0.b, p0/z, z0.b, z0.b
53 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
54 // CHECK-NEXT: match p0.b, p0/z, z0.b, z0.b
55 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
57 movprfx z0, z7
58 match p0.b, p0/z, z0.b, z0.b
59 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
60 // CHECK-NEXT: match p0.b, p0/z, z0.b, z0.b
61 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: