[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / fcmla-diagnostics.s
blobe9b42e04101bd2167df443926eef6e1f6a154e84
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Restricted predicate out of range.
6 fcmla z0.d, p8/m, z1.d, z2.d, #0
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
8 // CHECK-NEXT: fcmla z0.d, p8/m, z1.d, z2.d, #0
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
12 // --------------------------------------------------------------------------//
13 // Invalid rotation
15 fcmla z0.d, p0/m, z1.d, z2.d, #360
16 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: complex rotation must be 0, 90, 180 or 270.
17 // CHECK-NEXT: fcmla z0.d, p0/m, z1.d, z2.d, #360
18 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20 fcmla z0.d, p0/m, z1.d, z2.d, #450
21 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: complex rotation must be 0, 90, 180 or 270.
22 // CHECK-NEXT: fcmla z0.d, p0/m, z1.d, z2.d, #450
23 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 // --------------------------------------------------------------------------//
27 // Index out of bounds or invalid for element size
29 fcmla z0.h, z1.h, z2.h[-1], #0
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 3].
31 // CHECK-NEXT: fcmla z0.h, z1.h, z2.h[-1], #0
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 fcmla z0.h, z1.h, z2.h[4], #0
35 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 3].
36 // CHECK-NEXT: fcmla z0.h, z1.h, z2.h[4], #0
37 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39 fcmla z0.s, z1.s, z2.s[-1], #0
40 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 1].
41 // CHECK-NEXT: fcmla z0.s, z1.s, z2.s[-1], #0
42 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 fcmla z0.s, z1.s, z2.s[2], #0
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 1].
46 // CHECK-NEXT: fcmla z0.s, z1.s, z2.s[2], #0
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 fcmla z0.d, z1.d, z2.d[0], #0
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
51 // CHECK-NEXT: fcmla z0.d, z1.d, z2.d[0], #0
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55 // --------------------------------------------------------------------------//
56 // Negative tests for instructions that are incompatible with movprfx
58 movprfx z21.s, p0/z, z28.s
59 fcmla z21.s, z10.s, z5.s[1], #90
60 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
61 // CHECK-NEXT: fcmla z21.s, z10.s, z5.s[1], #90
62 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: