[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / ldnf1b-diagnostics.s
blob1b641282fbde27ee6eaff299464cce10c2e581a8
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Immediate out of lower bound [-8, 7].
6 ldnf1b z23.b, p0/z, [x13, #-9, MUL VL]
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
8 // CHECK-NEXT: ldnf1b z23.b, p0/z, [x13, #-9, MUL VL]
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 ldnf1b z29.b, p0/z, [x3, #8, MUL VL]
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
13 // CHECK-NEXT: ldnf1b z29.b, p0/z, [x3, #8, MUL VL]
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 ldnf1b z21.h, p4/z, [x17, #-9, MUL VL]
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
18 // CHECK-NEXT: ldnf1b z21.h, p4/z, [x17, #-9, MUL VL]
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 ldnf1b z10.h, p5/z, [x16, #8, MUL VL]
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
23 // CHECK-NEXT: ldnf1b z10.h, p5/z, [x16, #8, MUL VL]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 ldnf1b z30.s, p6/z, [x25, #-9, MUL VL]
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
28 // CHECK-NEXT: ldnf1b z30.s, p6/z, [x25, #-9, MUL VL]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31 ldnf1b z29.s, p5/z, [x15, #8, MUL VL]
32 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
33 // CHECK-NEXT: ldnf1b z29.s, p5/z, [x15, #8, MUL VL]
34 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 ldnf1b z28.d, p2/z, [x28, #-9, MUL VL]
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
38 // CHECK-NEXT: ldnf1b z28.d, p2/z, [x28, #-9, MUL VL]
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 ldnf1b z27.d, p1/z, [x26, #8, MUL VL]
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-8, 7].
43 // CHECK-NEXT: ldnf1b z27.d, p1/z, [x26, #8, MUL VL]
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
47 // --------------------------------------------------------------------------//
48 // restricted predicate has range [0, 7].
50 ldnf1b z27.b, p8/z, [x29, #1, MUL VL]
51 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
52 // CHECK-NEXT: ldnf1b z27.b, p8/z, [x29, #1, MUL VL]
53 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55 ldnf1b z9.h, p8/z, [x25, #1, MUL VL]
56 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
57 // CHECK-NEXT: ldnf1b z9.h, p8/z, [x25, #1, MUL VL]
58 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
60 ldnf1b z12.s, p8/z, [x13, #1, MUL VL]
61 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
62 // CHECK-NEXT: ldnf1b z12.s, p8/z, [x13, #1, MUL VL]
63 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
65 ldnf1b z4.d, p8/z, [x11, #1, MUL VL]
66 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
67 // CHECK-NEXT: ldnf1b z4.d, p8/z, [x11, #1, MUL VL]
68 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
71 // --------------------------------------------------------------------------//
72 // Invalid vector list.
74 ldnf1b { }, p0/z, [x1, #1, MUL VL]
75 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected
76 // CHECK-NEXT: ldnf1b { }, p0/z, [x1, #1, MUL VL]
77 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
79 ldnf1b { z1.b, z2.b }, p0/z, [x1, #1, MUL VL]
80 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
81 // CHECK-NEXT: ldnf1b { z1.b, z2.b }, p0/z, [x1, #1, MUL VL]
82 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
84 ldnf1b { v0.2d }, p0/z, [x1, #1, MUL VL]
85 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
86 // CHECK-NEXT: ldnf1b { v0.2d }, p0/z, [x1, #1, MUL VL]
87 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
90 // --------------------------------------------------------------------------//
91 // Negative tests for instructions that are incompatible with movprfx
93 movprfx z21.d, p5/z, z28.d
94 ldnf1b { z21.d }, p5/z, [x10, #5, mul vl]
95 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
96 // CHECK-NEXT: ldnf1b { z21.d }, p5/z, [x10, #5, mul vl]
97 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
99 movprfx z21, z28
100 ldnf1b { z21.d }, p5/z, [x10, #5, mul vl]
101 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
102 // CHECK-NEXT: ldnf1b { z21.d }, p5/z, [x10, #5, mul vl]
103 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: