[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / ftmad-diagnostics.s
blobec7741810b3c33e33eb52f05c292f05249f01376
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
4 // ------------------------------------------------------------------------- //
5 // Invalid element size
7 ftmad 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]+}}:
12 ftmad 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]+}}:
18 // ------------------------------------------------------------------------- //
19 // Tied operands must match
21 ftmad 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]+}}:
27 // ------------------------------------------------------------------------- //
28 // Invalid immediate range
30 ftmad 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]+}}:
35 ftmad 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]+}}:
41 // --------------------------------------------------------------------------//
42 // Negative tests for instructions that are incompatible with movprfx
44 movprfx z0.d, p0/z, z7.d
45 ftmad 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]+}}: