[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE / cmplt-diagnostics.s
blob0a76e7792f3910ee461d2af13e6123de94e51ac0
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Restricted predicate out of range.
6 cmplt p0.b, p8/z, z0.b, z0.b
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
8 // CHECK-NEXT: cmplt p0.b, p8/z, z0.b, z0.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 // --------------------------------------------------------------------------//
13 // Invalid predicate operation
15 cmplt p0.b, p0/m, z0.b, z0.b
16 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
17 // CHECK-NEXT: cmplt p0.b, p0/m, z0.b, z0.b
18 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 // --------------------------------------------------------------------------//
22 // Invalid source registers
24 cmplt p0.b, p0/z, z0.b, z0.h
25 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
26 // CHECK-NEXT: cmplt p0.b, p0/z, z0.b, z0.h
27 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29 cmplt p0.h, p0/z, z0.h, z0.s
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
31 // CHECK-NEXT: cmplt p0.h, p0/z, z0.h, z0.s
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 cmplt p0.s, p0/z, z0.s, z0.h
35 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
36 // CHECK-NEXT: cmplt p0.s, p0/z, z0.s, z0.h
37 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39 cmplt p0.d, p0/z, z0.d, z0.s
40 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
41 // CHECK-NEXT: cmplt p0.d, p0/z, z0.d, z0.s
42 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 cmplt p0.b, p0/z, z0.h, z0.h
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
46 // CHECK-NEXT: cmplt p0.b, p0/z, z0.h, z0.h
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 cmplt p0.h, p0/z, z0.s, z0.s
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
51 // CHECK-NEXT: cmplt p0.h, p0/z, z0.s, z0.s
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 cmplt p0.s, p0/z, z0.h, z0.h
55 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
56 // CHECK-NEXT: cmplt p0.s, p0/z, z0.h, z0.h
57 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
59 cmplt p0.d, p0/z, z0.s, z0.s
60 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
61 // CHECK-NEXT: cmplt p0.d, p0/z, z0.s, z0.s
62 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
65 // --------------------------------------------------------------------------//
66 // Invalid immediate range
68 cmplt p0.s, p0/z, z0.s, #-17
69 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
70 // CHECK-NEXT: cmplt p0.s, p0/z, z0.s, #-17
71 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
73 cmplt p0.s, p0/z, z0.s, #16
74 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
75 // CHECK-NEXT: cmplt p0.s, p0/z, z0.s, #16
76 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
79 // --------------------------------------------------------------------------//
80 // Negative tests for instructions that are incompatible with movprfx
82 movprfx z0.d, p0/z, z7.d
83 cmplt p0.d, p0/z, z0.d, #15
84 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
85 // CHECK-NEXT: cmplt p0.d, p0/z, z0.d, #15
86 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
88 movprfx z0, z7
89 cmplt p0.d, p0/z, z0.d, #15
90 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
91 // CHECK-NEXT: cmplt p0.d, p0/z, z0.d, #15
92 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 movprfx z0.s, p0/z, z7.s
95 cmplt p0.s, p0/z, z0.s, z0.d
96 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
97 // CHECK-NEXT: cmplt p0.s, p0/z, z0.s, z0.d
98 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
100 movprfx z0, z7
101 cmplt p0.s, p0/z, z0.s, z0.d
102 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
103 // CHECK-NEXT: cmplt p0.s, p0/z, z0.s, z0.d
104 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: