[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / AArch64 / SVE2 / sli-diagnostics.s
blob150bf95a693a27ec8fbfe5bd7410bfe2116c579a
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
3 sli z18.b, z28.b, #-1
4 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
5 // CHECK-NEXT: sli z18.b, z28.b, #-1
6 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
8 sli z1.b, z9.b, #8
9 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]
10 // CHECK-NEXT: sli z1.b, z9.b, #8
11 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
13 sli z21.h, z2.h, #-1
14 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
15 // CHECK-NEXT: sli z21.h, z2.h, #-1
16 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18 sli z14.h, z30.h, #16
19 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]
20 // CHECK-NEXT: sli z14.h, z30.h, #16
21 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23 sli z6.s, z12.s, #-1
24 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
25 // CHECK-NEXT: sli z6.s, z12.s, #-1
26 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
28 sli z23.s, z19.s, #32
29 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31]
30 // CHECK-NEXT: sli z23.s, z19.s, #32
31 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
33 sli z3.d, z24.d, #-1
34 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
35 // CHECK-NEXT: sli z3.d, z24.d, #-1
36 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
38 sli z25.d, z16.d, #64
39 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63]
40 // CHECK-NEXT: sli z25.d, z16.d, #64
41 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44 // --------------------------------------------------------------------------//
45 // Element sizes must match
47 sli z0.b, z0.h, #0
48 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
49 // CHECK-NEXT: sli z0.b, z0.h, #0
50 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
52 // --------------------------------------------------------------------------//
53 // Negative tests for instructions that are incompatible with movprfx
55 movprfx z31, z6
56 sli z31.d, z31.d, #63
57 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
58 // CHECK-NEXT: sli z31.d, z31.d, #63
59 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: