Debian Codegraph @

llvm/test/MC/AArch64/SVE2/histcnt-diagnostics.s

raw
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
2
3
4 // --------------------------------------------------------------------------//
5 // Invalid element width
6
7 histcnt z0.b, p0/z, z0.b, z0.b
8 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
9 // CHECK-NEXT: histcnt z0.b, p0/z, z0.b, z0.b
10 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12 histcnt z0.h, p0/z, z0.h, z1.h
13 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
14 // CHECK-NEXT: histcnt z0.h, p0/z, z0.h, z1.h
15 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17
18 // --------------------------------------------------------------------------//
19 // Invalid predicate operation
20
21 histcnt z0.s, p0/m, z1.s, z2.s
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
23 // CHECK-NEXT: histcnt z0.s, p0/m, z1.s, z2.s
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
25
26
27 // --------------------------------------------------------------------------//
28 // Predicate not in restricted predicate range
29
30 histcnt z0.s, p8/z, z1.s, z2.s
31 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
32 // CHECK-NEXT: histcnt z0.s, p8/z, z1.s, z2.s
33 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35
36 // --------------------------------------------------------------------------//
37 // Negative tests for instructions that are incompatible with movprfx
38
39 movprfx z0.s, p0/z, z7.s
40 histcnt z0.s, p7/z, z1.s, z2.s
41 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
42 // CHECK-NEXT: histcnt z0.s, p7/z, z1.s, z2.s
43 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
44
45 movprfx z0, z7
46 histcnt z0.s, p7/z, z1.s, z2.s
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
48 // CHECK-NEXT: histcnt z0.s, p7/z, z1.s, z2.s
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: