[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / index-diagnostics.s
blob3b2a4aa656fd3b4a930b918cae0300d1f981911a
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Immediate out of lower bound [-16, 15].
6 index z27.b, #-17, #-16
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
8 // CHECK-NEXT: index z27.b, #-17, #-16
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 index z11.h, #-16, #-17
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
13 // CHECK-NEXT: index z11.h, #-16, #-17
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 index z2.s, #16, #-16
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
18 // CHECK-NEXT: index z2.s, #16, #-16
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 index z2.d, #-16, #16
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
23 // CHECK-NEXT: index z2.d, #-16, #16
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 index z4.b, #-17, w28
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
28 // CHECK-NEXT: index z4.b, #-17, w28
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31 index z9.h, #16, w23
32 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
33 // CHECK-NEXT: index z9.h, #16, w23
34 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 index z3.s, w10, #-17
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
38 // CHECK-NEXT: index z3.s, w10, #-17
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 index z17.d, x9, #16
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
43 // CHECK-NEXT: index z17.d, x9, #16
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
47 // --------------------------------------------------------------------------//
48 // Invalid register
50 index z17.s, x9, w7
51 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
52 // CHECK-NEXT: index z17.s, x9, w7
53 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55 index z17.d, w9, w7
56 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
57 // CHECK-NEXT: index z17.d, w9, w7
58 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
61 // --------------------------------------------------------------------------//
62 // Negative tests for instructions that are incompatible with movprfx
64 movprfx z21.d, p0/z, z28.d
65 index z21.d, x10, x21
66 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
67 // CHECK-NEXT: index z21.d, x10, x21
68 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
70 movprfx z21, z28
71 index z21.d, x10, x21
72 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
73 // CHECK-NEXT: index z21.d, x10, x21
74 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
76 movprfx z23.d, p0/z, z30.d
77 index z23.d, x13, #8
78 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
79 // CHECK-NEXT: index z23.d, x13, #8
80 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
82 movprfx z23, z30
83 index z23.d, x13, #8
84 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
85 // CHECK-NEXT: index z23.d, x13, #8
86 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
88 movprfx z23.d, p0/z, z30.d
89 index z23.d, #13, x8
90 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
91 // CHECK-NEXT: index z23.d, #13, x8
92 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 movprfx z23, z30
95 index z23.d, #13, x8
96 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
97 // CHECK-NEXT: index z23.d, #13, x8
98 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: