[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / fmov-diagnostics.s
blobfcf53644b50ca579c31346e70ecb8162ac7db34d
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Invalid predicate suffix
5 fmov z0.h, p0/z, #0.0
6 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
7 // CHECK-NEXT: fmov z0.h, p0/z, #0.0
8 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10 fmov z0.s, p0/z, #0.0
11 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
12 // CHECK-NEXT: fmov z0.s, p0/z, #0.0
13 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15 fmov z0.d, p0/z, #0.0
16 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
17 // CHECK-NEXT: fmov z0.d, p0/z, #0.0
18 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 // --------------------------------------------------------------------------//
22 // Invalid immediates
24 fmov z0.h, #-0.05859375 // r = -4, n = 15
25 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
26 // CHECK-NEXT: fmov z0.h, #-0.05859375 // r = -4, n = 15
27 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29 fmov z0.s, #-0.05859375 // r = -4, n = 15
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
31 // CHECK-NEXT: fmov z0.s, #-0.05859375 // r = -4, n = 15
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 fmov z0.d, #-0.05859375 // r = -4, n = 15
35 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
36 // CHECK-NEXT: fmov z0.d, #-0.05859375 // r = -4, n = 15
37 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39 fmov z0.h, #-64.00000000 // r = 5, n = 32
40 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
41 // CHECK-NEXT: fmov z0.h, #-64.00000000 // r = 5, n = 32
42 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 fmov z0.s, #-64.00000000 // r = 5, n = 32
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
46 // CHECK-NEXT: fmov z0.s, #-64.00000000 // r = 5, n = 32
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 fmov z0.d, #-64.00000000 // r = 5, n = 32
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
51 // CHECK-NEXT: fmov z0.d, #-64.00000000 // r = 5, n = 32
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 fmov z0.h, #0.05859375 // r = -4, n = 15
55 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
56 // CHECK-NEXT: fmov z0.h, #0.05859375 // r = -4, n = 15
57 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
59 fmov z0.s, #0.05859375 // r = -4, n = 15
60 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
61 // CHECK-NEXT: fmov z0.s, #0.05859375 // r = -4, n = 15
62 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
64 fmov z0.d, #0.05859375 // r = -4, n = 15
65 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
66 // CHECK-NEXT: fmov z0.d, #0.05859375 // r = -4, n = 15
67 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
69 fmov z0.h, #64.00000000 // r = 5, n = 32
70 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
71 // CHECK-NEXT: fmov z0.h, #64.00000000 // r = 5, n = 32
72 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
74 fmov z0.s, #64.00000000 // r = 5, n = 32
75 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
76 // CHECK-NEXT: fmov z0.s, #64.00000000 // r = 5, n = 32
77 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
79 fmov z0.d, #64.00000000 // r = 5, n = 32
80 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
81 // CHECK-NEXT: fmov z0.d, #64.00000000 // r = 5, n = 32
82 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
84 fmov z0.h, p0/m, #-0.05859375 // r = -4, n = 15
85 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
86 // CHECK-NEXT: fmov z0.h, p0/m, #-0.05859375 // r = -4, n = 15
87 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
89 fmov z0.s, p0/m, #-0.05859375 // r = -4, n = 15
90 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
91 // CHECK-NEXT: fmov z0.s, p0/m, #-0.05859375 // r = -4, n = 15
92 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 fmov z0.d, p0/m, #-0.05859375 // r = -4, n = 15
95 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
96 // CHECK-NEXT: fmov z0.d, p0/m, #-0.05859375 // r = -4, n = 15
97 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
99 fmov z0.h, p0/m, #-64.00000000 // r = 5, n = 32
100 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
101 // CHECK-NEXT: fmov z0.h, p0/m, #-64.00000000 // r = 5, n = 32
102 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
104 fmov z0.s, p0/m, #-64.00000000 // r = 5, n = 32
105 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
106 // CHECK-NEXT: fmov z0.s, p0/m, #-64.00000000 // r = 5, n = 32
107 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
109 fmov z0.d, p0/m, #-64.00000000 // r = 5, n = 32
110 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
111 // CHECK-NEXT: fmov z0.d, p0/m, #-64.00000000 // r = 5, n = 32
112 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
114 fmov z0.h, p0/m, #0.05859375 // r = -4, n = 15
115 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
116 // CHECK-NEXT: fmov z0.h, p0/m, #0.05859375 // r = -4, n = 15
117 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
119 fmov z0.s, p0/m, #0.05859375 // r = -4, n = 15
120 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
121 // CHECK-NEXT: fmov z0.s, p0/m, #0.05859375 // r = -4, n = 15
122 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
124 fmov z0.d, p0/m, #0.05859375 // r = -4, n = 15
125 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
126 // CHECK-NEXT: fmov z0.d, p0/m, #0.05859375 // r = -4, n = 15
127 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
129 fmov z0.h, p0/m, #64.00000000 // r = 5, n = 32
130 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
131 // CHECK-NEXT: fmov z0.h, p0/m, #64.00000000 // r = 5, n = 32
132 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
134 fmov z0.s, p0/m, #64.00000000 // r = 5, n = 32
135 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
136 // CHECK-NEXT: fmov z0.s, p0/m, #64.00000000 // r = 5, n = 32
137 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
139 fmov z0.d, p0/m, #64.00000000 // r = 5, n = 32
140 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: expected compatible register or floating-point constant
141 // CHECK-NEXT: fmov z0.d, p0/m, #64.00000000 // r = 5, n = 32
142 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
145 // --------------------------------------------------------------------------//
146 // Negative tests for instructions that are incompatible with movprfx
148 movprfx z0.d, p0/z, z7.d
149 fmov z0.d, #31.00000000
150 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
151 // CHECK-NEXT: fmov z0.d, #31.00000000
152 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
154 movprfx z0, z7
155 fmov z0.d, #31.00000000
156 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
157 // CHECK-NEXT: fmov z0.d, #31.00000000
158 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: