[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE / ld1rqw-diagnostics.s
blobb4d45e5ceb6d1ed5682629e38f85602fb69d2626
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Immediate out of lower bound [-128, 112].
6 ld1rqw z0.s, p0/z, [x0, #-144]
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 16 in range [-128, 112].
8 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #-144]
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 ld1rqw z0.s, p0/z, [x0, #-129]
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 16 in range [-128, 112].
13 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #-129]
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 ld1rqw z0.s, p0/z, [x0, #113]
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 16 in range [-128, 112].
18 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #113]
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 ld1rqw z0.s, p0/z, [x0, #128]
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 16 in range [-128, 112].
23 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #128]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 ld1rqw z0.s, p0/z, [x0, #12]
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be a multiple of 16 in range [-128, 112].
28 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #12]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid immediate suffix
35 ld1rqw z0.s, p0/z, [x0, #16, MUL VL]
36 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
37 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, #16, MUL VL]
38 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 // --------------------------------------------------------------------------//
42 // Invalid destination register width.
44 ld1rqw z0.b, p0/z, [x0, x1, lsl #2]
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
46 // CHECK-NEXT: ld1rqw z0.b, p0/z, [x0, x1, lsl #2]
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 ld1rqw z0.h, p0/z, [x0, x1, lsl #2]
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
51 // CHECK-NEXT: ld1rqw z0.h, p0/z, [x0, x1, lsl #2]
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 ld1rqw z0.d, p0/z, [x0, x1, lsl #2]
55 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
56 // CHECK-NEXT: ld1rqw z0.d, p0/z, [x0, x1, lsl #2]
57 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
60 // --------------------------------------------------------------------------//
61 // Invalid scalar + scalar addressing modes
63 ld1rqw z0.s, p0/z, [x0, xzr, lsl #2]
64 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #2'
65 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, xzr, lsl #2]
66 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
68 ld1rqw z0.s, p0/z, [x0, x1, lsl #3]
69 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #2'
70 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, x1, lsl #3]
71 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
73 ld1rqw z0.s, p0/z, [x0, w1, lsl #2]
74 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #2'
75 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, w1, lsl #2]
76 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
78 ld1rqw z0.s, p0/z, [x0, w1, uxtw #1]
79 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 with required shift 'lsl #2'
80 // CHECK-NEXT: ld1rqw z0.s, p0/z, [x0, w1, uxtw #1]
81 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
84 // --------------------------------------------------------------------------//
85 // Negative tests for instructions that are incompatible with movprfx
87 movprfx z23.s, p3/z, z30.s
88 ld1rqw { z23.s }, p3/z, [x13, #112]
89 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
90 // CHECK-NEXT: ld1rqw { z23.s }, p3/z, [x13, #112]
91 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
93 movprfx z23, z30
94 ld1rqw { z23.s }, p3/z, [x13, #112]
95 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
96 // CHECK-NEXT: ld1rqw { z23.s }, p3/z, [x13, #112]
97 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: