1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve  2>&1 < %s| FileCheck %s
2
3
4// ------------------------------------------------------------------------- //
5// Invalid element size
6
7ftmad z0.b, z0.b, z1.b, #7
8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
9// CHECK-NEXT: ftmad z0.b, z0.b, z1.b, #7
10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12ftmad z0.b, z0.b, z1.h, #7
13// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
14// CHECK-NEXT: ftmad z0.b, z0.b, z1.h, #7
15// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17
18// ------------------------------------------------------------------------- //
19// Tied operands must match
20
21ftmad z0.h, z1.h, z2.h, #7
22// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must match destination register
23// CHECK-NEXT: ftmad z0.h, z1.h, z2.h, #7
24// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26
27// ------------------------------------------------------------------------- //
28// Invalid immediate range
29
30ftmad z0.h, z0.h, z1.h, #-1
31// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
32// CHECK-NEXT: ftmad z0.h, z0.h, z1.h, #-1
33// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35ftmad z0.h, z0.h, z1.h, #8
36// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
37// CHECK-NEXT: ftmad z0.h, z0.h, z1.h, #8
38// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39
40
41// --------------------------------------------------------------------------//
42// Negative tests for instructions that are incompatible with movprfx
43
44movprfx z0.d, p0/z, z7.d
45ftmad z0.d, z0.d, z31.d, #7
46// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
47// CHECK-NEXT: ftmad z0.d, z0.d, z31.d, #7
48// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49