50 lines · plain
1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s2 3 4// --------------------------------------------------------------------------//5// Invalid element width6 7histcnt z0.b, p0/z, z0.b, z0.b8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width9// CHECK-NEXT: histcnt z0.b, p0/z, z0.b, z0.b10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:11 12histcnt z0.h, p0/z, z0.h, z1.h13// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width14// CHECK-NEXT: histcnt z0.h, p0/z, z0.h, z1.h15// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:16 17 18// --------------------------------------------------------------------------//19// Invalid predicate operation20 21histcnt z0.s, p0/m, z1.s, z2.s22// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction23// CHECK-NEXT: histcnt z0.s, p0/m, z1.s, z2.s24// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:25 26 27// --------------------------------------------------------------------------//28// Predicate not in restricted predicate range29 30histcnt z0.s, p8/z, z1.s, z2.s31// 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.s33// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:34 35 36// --------------------------------------------------------------------------//37// Negative tests for instructions that are incompatible with movprfx38 39movprfx z0.s, p0/z, z7.s40histcnt z0.s, p7/z, z1.s, z2.s41// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov42// CHECK-NEXT: histcnt z0.s, p7/z, z1.s, z2.s43// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:44 45movprfx z0, z746histcnt z0.s, p7/z, z1.s, z2.s47// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov48// CHECK-NEXT: histcnt z0.s, p7/z, z1.s, z2.s49// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:50