[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / cntw-diagnostics.s
blobc1cad40cc55f2657b95573158f90d0d96a561ee0
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
3 // ------------------------------------------------------------------------- //
4 // Invalid result register
6 cntw w0
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
8 // CHECK-NEXT: cntw w0
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 cntw sp
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
13 // CHECK-NEXT: cntw sp
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 cntw z0.b
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
18 // CHECK-NEXT: cntw z0.b
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
22 // ------------------------------------------------------------------------- //
23 // Immediate not compatible with encode/decode function.
25 cntw x0, all, mul #-1
26 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
27 // CHECK-NEXT: cntw x0, all, mul #-1
28 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
30 cntw x0, all, mul #0
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
32 // CHECK-NEXT: cntw x0, all, mul #0
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
35 cntw x0, all, mul #17
36 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
37 // CHECK-NEXT: cntw x0, all, mul #17
38 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 // ------------------------------------------------------------------------- //
42 // Invalid predicate patterns
44 cntw x0, #-1
45 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern
46 // CHECK-NEXT: cntw x0, #-1
47 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
49 cntw x0, #32
50 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern
51 // CHECK-NEXT: cntw x0, #32
52 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54 cntw x0, vl512
55 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
56 // CHECK-NEXT: cntw x0, vl512
57 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: