[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE2 / histcnt-diagnostics.s
blob59bffa608d21450195274f78e4639450e13c7b3b
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
4 // --------------------------------------------------------------------------//
5 // Invalid element width
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]+}}:
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]+}}:
18 // --------------------------------------------------------------------------//
19 // Invalid predicate operation
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]+}}:
27 // --------------------------------------------------------------------------//
28 // Predicate not in restricted predicate range
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]+}}:
36 // --------------------------------------------------------------------------//
37 // Negative tests for instructions that are incompatible with movprfx
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]+}}:
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]+}}: