[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / AArch64 / SVE / cmpne-diagnostics.s
blob1c886331f8550a059a34ddd0a3de0c852ef5846c
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Restricted predicate out of range.
6 cmpne 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: cmpne p0.b, p8/z, z0.b, z0.b
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 // --------------------------------------------------------------------------//
13 // Invalid predicate operation
15 cmpne p0.b, p0/m, z0.b, z0.b
16 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
17 // CHECK-NEXT: cmpne p0.b, p0/m, z0.b, z0.b
18 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 // --------------------------------------------------------------------------//
22 // Invalid source registers
24 cmpne p0.b, p0/z, z0.b, z0.h
25 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
26 // CHECK-NEXT: cmpne p0.b, p0/z, z0.b, z0.h
27 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29 cmpne p0.h, p0/z, z0.h, z0.s
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
31 // CHECK-NEXT: cmpne p0.h, p0/z, z0.h, z0.s
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 cmpne p0.s, p0/z, z0.s, z0.h
35 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
36 // CHECK-NEXT: cmpne p0.s, p0/z, z0.s, z0.h
37 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39 cmpne p0.d, p0/z, z0.d, z0.s
40 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
41 // CHECK-NEXT: cmpne p0.d, p0/z, z0.d, z0.s
42 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 cmpne p0.b, p0/z, z0.h, z0.h
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
46 // CHECK-NEXT: cmpne p0.b, p0/z, z0.h, z0.h
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 cmpne p0.h, p0/z, z0.s, z0.s
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
51 // CHECK-NEXT: cmpne p0.h, p0/z, z0.s, z0.s
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 cmpne p0.s, p0/z, z0.h, z0.h
55 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
56 // CHECK-NEXT: cmpne p0.s, p0/z, z0.h, z0.h
57 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
59 cmpne p0.d, p0/z, z0.s, z0.s
60 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
61 // CHECK-NEXT: cmpne p0.d, p0/z, z0.s, z0.s
62 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
65 // --------------------------------------------------------------------------//
66 // Invalid immediate range
68 cmpne 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: cmpne p0.s, p0/z, z0.s, #-17
71 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
73 cmpne 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: cmpne 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 cmpne 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: cmpne p0.d, p0/z, z0.d, #15
86 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
88 movprfx z0, z7
89 cmpne 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: cmpne p0.d, p0/z, z0.d, #15
92 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 movprfx z0.s, p0/z, z7.s
95 cmpne 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: cmpne p0.s, p0/z, z0.s, z0.d
98 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
100 movprfx z0, z7
101 cmpne 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: cmpne p0.s, p0/z, z0.s, z0.d
104 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: