[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / clasta-diagnostics.s
blobcd784871360f8b5364c3c453c053e7d726f3f792
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
4 // ------------------------------------------------------------------------- //
5 // Invalid predicate
7 clasta w0, p8, w0, z31.b
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
9 // CHECK-NEXT: clasta w0, p8, w0, z31.b
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 clasta w0, p7.b, w0, z31.b
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
14 // CHECK-NEXT: clasta w0, p7.b, w0, z31.b
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
17 clasta w0, p7.q, w0, z31.b
18 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
19 // CHECK-NEXT: clasta w0, p7.q, w0, z31.b
20 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23 // ------------------------------------------------------------------------- //
24 // Invalid element width
26 clasta w0, p7, x0, z31.b
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
28 // CHECK-NEXT: clasta w0, p7, x0, z31.b
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31 clasta x0, p7, x0, z31.b
32 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
33 // CHECK-NEXT: clasta x0, p7, x0, z31.b
34 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 clasta x0, p7, x0, z31.h
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
38 // CHECK-NEXT: clasta x0, p7, x0, z31.h
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 clasta x0, p7, x0, z31.s
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
43 // CHECK-NEXT: clasta x0, p7, x0, z31.s
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
46 clasta w0, p7, w0, z31.d
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
48 // CHECK-NEXT: clasta w0, p7, w0, z31.d
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
51 clasta b0, p7, b0, z31.h
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
53 // CHECK-NEXT: clasta b0, p7, b0, z31.h
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
56 clasta h0, p7, h0, z31.s
57 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
58 // CHECK-NEXT: clasta h0, p7, h0, z31.s
59 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
61 clasta s0, p7, s0, z31.d
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
63 // CHECK-NEXT: clasta s0, p7, s0, z31.d
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
66 clasta d0, p7, d0, z31.b
67 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
68 // CHECK-NEXT: clasta d0, p7, d0, z31.b
69 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
71 clasta z0.b, p7, z0.b, z31.h
72 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
73 // CHECK-NEXT: clasta z0.b, p7, z0.b, z31.h
74 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
76 clasta z0.h, p7, z0.h, z31.s
77 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
78 // CHECK-NEXT: clasta z0.h, p7, z0.h, z31.s
79 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
81 clasta z0.s, p7, z0.s, z31.d
82 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
83 // CHECK-NEXT: clasta z0.s, p7, z0.s, z31.d
84 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
86 clasta z0.d, p7, z0.d, z31.b
87 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
88 // CHECK-NEXT: clasta z0.d, p7, z0.d, z31.b
89 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
92 // --------------------------------------------------------------------------//
93 // Negative tests for instructions that are incompatible with movprfx
95 movprfx z31.d, p7/z, z6.d
96 clasta x0, p7, x0, z31.d
97 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
98 // CHECK-NEXT: clasta x0, p7, x0, z31.d
99 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
101 movprfx z31, z6
102 clasta x0, p7, x0, z31.d
103 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
104 // CHECK-NEXT: clasta x0, p7, x0, z31.d
105 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
107 movprfx z31.d, p7/z, z6.d
108 clasta d0, p7, d0, z31.d
109 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
110 // CHECK-NEXT: clasta d0, p7, d0, z31.d
111 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
113 movprfx z31, z6
114 clasta d0, p7, d0, z31.d
115 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
116 // CHECK-NEXT: clasta d0, p7, d0, z31.d
117 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
119 movprfx z0.d, p7/z, z7.d
120 clasta z0.d, p7, z0.d, z31.d
121 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
122 // CHECK-NEXT: clasta z0.d, p7, z0.d, z31.d
123 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: