summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/AArch64/SVE/clz-diagnostics.s
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2018-07-10 14:05:55 +0000
committerSander de Smalen <sander.desmalen@arm.com>2018-07-10 14:05:55 +0000
commit53108d48f74e3bd68b82b17238d6872534dfb87c (patch)
tree69b0c64f9052a9e3cb4bf29adca682cc3a5a4dd2 /llvm/test/MC/AArch64/SVE/clz-diagnostics.s
parent3ae7d63c80f1221864a9fa0bafc4ab98f3aba0d3 (diff)
downloadbcm5719-llvm-53108d48f74e3bd68b82b17238d6872534dfb87c.tar.gz
bcm5719-llvm-53108d48f74e3bd68b82b17238d6872534dfb87c.zip
[AArch64][SVE] Asm: Support for predicated unary operations.
This patch adds support for the following instructions: CLS (Count Leading Sign bits) CLZ (Count Leading Zeros) CNT (Count non-zero bits) CNOT (Logically invert boolean condition in vector) NOT (Bitwise invert vector) FABS (Floating-point absolute value) FNEG (Floating-point negate) All operations are predicated and unary, e.g. clz z0.s, p0/m, z1.s - CLS, CLZ, CNT, CNOT and NOT have variants for 8, 16, 32 and 64 bit elements. - FABS and FNEG have variants for 16, 32 and 64 bit elements. llvm-svn: 336677
Diffstat (limited to 'llvm/test/MC/AArch64/SVE/clz-diagnostics.s')
-rw-r--r--llvm/test/MC/AArch64/SVE/clz-diagnostics.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/MC/AArch64/SVE/clz-diagnostics.s b/llvm/test/MC/AArch64/SVE/clz-diagnostics.s
new file mode 100644
index 00000000000..242b9330218
--- /dev/null
+++ b/llvm/test/MC/AArch64/SVE/clz-diagnostics.s
@@ -0,0 +1,18 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+// ------------------------------------------------------------------------- //
+// Invalid predicate
+
+clz z31.b, p8/m, z31.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7].
+// CHECK-NEXT: clz z31.b, p8/m, z31.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// ------------------------------------------------------------------------- //
+// Invalid element width
+
+clz z31.b, p7/m, z31.h
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: clz z31.b, p7/m, z31.h
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
OpenPOWER on IntegriCloud