[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / AArch64 / SVE2 / ldnt1b-diagnostics.s
blobbd4cf647a03af5f173c7ab49504452c06cd8f87d
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
4 // --------------------------------------------------------------------------//
5 // Invalid result type.
7 ldnt1b { z0.b }, p0/z, [z0.s]
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
9 // CHECK-NEXT: ldnt1b { z0.b }, p0/z, [z0.s]
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 ldnt1b { z0.h }, p0/z, [z0.s]
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
14 // CHECK-NEXT: ldnt1b { z0.h }, p0/z, [z0.s]
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 // --------------------------------------------------------------------------//
19 // Invalid base vector.
21 ldnt1b { z0.s }, p0/z, [z0.b]
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
23 // CHECK-NEXT: ldnt1b { z0.s }, p0/z, [z0.b]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 ldnt1b { z0.d }, p0/z, [z0.h]
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
28 // CHECK-NEXT: ldnt1b { z0.d }, p0/z, [z0.h]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
32 // --------------------------------------------------------------------------//
33 // Invalid offset type.
35 ldnt1b { z0.d }, p0/z, [z0.d, z1.d]
36 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
37 // CHECK-NEXT: ldnt1b { z0.d }, p0/z, [z0.d, z1.d]
38 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 // --------------------------------------------------------------------------//
42 // Invalid predicate operation
44 ldnt1b { z0.d }, p0/m, [z0.d]
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
46 // CHECK-NEXT: ldnt1b { z0.d }, p0/m, [z0.d]
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
50 // --------------------------------------------------------------------------//
51 // restricted predicate has range [0, 7].
53 ldnt1b { z27.d }, p8/z, [z0.d]
54 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
55 // CHECK-NEXT: ldnt1b { z27.d }, p8/z, [z0.d]
56 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
59 // --------------------------------------------------------------------------//
60 // Invalid vector list.
62 ldnt1b { }, p0/z, [z0.d]
63 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector register expected
64 // CHECK-NEXT: ldnt1b { }, p0/z, [z0.d]
65 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
67 ldnt1b { z0.d, z1.d }, p0/z, [z0.d]
68 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
69 // CHECK-NEXT: ldnt1b { z0.d, z1.d }, p0/z, [z0.d]
70 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
72 ldnt1b { v0.2d }, p0/z, [z0.d]
73 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
74 // CHECK-NEXT: ldnt1b { v0.2d }, p0/z, [z0.d]
75 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
78 // --------------------------------------------------------------------------//
79 // Negative tests for instructions that are incompatible with movprfx
81 movprfx z0.d, p0/z, z7.d
82 ldnt1b { z0.d }, p0/z, [z0.d, x0]
83 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
84 // CHECK-NEXT: ldnt1b { z0.d }, p0/z, [z0.d, x0]
85 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
87 movprfx z0, z7
88 ldnt1b { z0.s }, p0/z, [z0.s, x0]
89 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
90 // CHECK-NEXT: ldnt1b { z0.s }, p0/z, [z0.s, x0]
91 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: