[llvm] r362378 - [AArch64][SVE2] Add CPU and arch directive tests

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 03:42:02 PDT 2019


Author: c-rhodes
Date: Mon Jun  3 03:42:02 2019
New Revision: 362378

URL: http://llvm.org/viewvc/llvm-project?rev=362378&view=rev
Log:
[AArch64][SVE2] Add CPU and arch directive tests

Summary:
This patch adds tests for directives .arch, .arch_extension and .cpu for
all features defined in Arm SVE2 architecture extension.

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D62602

Added:
    llvm/trunk/test/MC/AArch64/SVE2/directive-arch-negative.s
    llvm/trunk/test/MC/AArch64/SVE2/directive-arch.s
    llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension-negative.s
    llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension.s
    llvm/trunk/test/MC/AArch64/SVE2/directive-cpu-negative.s
    llvm/trunk/test/MC/AArch64/SVE2/directive-cpu.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-arch-negative.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-arch-negative.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-arch-negative.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-arch-negative.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,31 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch armv8-a+sve2
+.arch armv8-a+nosve2
+tbx z0.b, z1.b, z2.b
+// CHECK: error: instruction requires: sve2
+// CHECK-NEXT: tbx z0.b, z1.b, z2.b
+
+.arch armv8-a+sve2-aes
+.arch armv8-a+nosve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: error: instruction requires: sve2-aes
+// CHECK-NEXT: aesd z23.b, z23.b, z13.b
+
+.arch armv8-a+sve2-sm4
+.arch armv8-a+nosve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: error: instruction requires: sve2-sm4
+// CHECK-NEXT: sm4e z0.s, z0.s, z0.s
+
+.arch armv8-a+sve2-sha3
+.arch armv8-a+nosve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: error: instruction requires: sve2-sha3
+// CHECK-NEXT: rax1 z0.d, z0.d, z0.d
+
+.arch armv8-a+bitperm
+.arch armv8-a+nobitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: error: instruction requires: bitperm
+// CHECK-NEXT: bgrp z21.s, z10.s, z21.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-arch.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-arch.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-arch.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-arch.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,21 @@
+// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch armv8-a+sve2
+tbx z0.b, z1.b, z2.b
+// CHECK: tbx z0.b, z1.b, z2.b
+
+.arch armv8-a+sve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: aesd z23.b, z23.b, z13.b
+
+.arch armv8-a+sve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: sm4e z0.s, z0.s, z0.s
+
+.arch armv8-a+sve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: rax1 z0.d, z0.d, z0.d
+
+.arch armv8-a+bitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: bgrp z21.s, z10.s, z21.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension-negative.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension-negative.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension-negative.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension-negative.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,31 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch_extension sve2
+.arch_extension nosve2
+tbx z0.b, z1.b, z2.b
+// CHECK: error: instruction requires: sve2
+// CHECK-NEXT: tbx z0.b, z1.b, z2.b
+
+.arch_extension sve2-aes
+.arch_extension nosve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: error: instruction requires: sve2-aes
+// CHECK-NEXT: aesd z23.b, z23.b, z13.b
+
+.arch_extension sve2-sm4
+.arch_extension nosve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: error: instruction requires: sve2-sm4
+// CHECK-NEXT: sm4e z0.s, z0.s, z0.s
+
+.arch_extension sve2-sha3
+.arch_extension nosve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: error: instruction requires: sve2-sha3
+// CHECK-NEXT: rax1 z0.d, z0.d, z0.d
+
+.arch_extension bitperm
+.arch_extension nobitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: error: instruction requires: bitperm
+// CHECK-NEXT: bgrp z21.s, z10.s, z21.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-arch_extension.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,21 @@
+// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.arch_extension sve2
+tbx z0.b, z1.b, z2.b
+// CHECK: tbx z0.b, z1.b, z2.b
+
+.arch_extension sve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: aesd z23.b, z23.b, z13.b
+
+.arch_extension sve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: sm4e z0.s, z0.s, z0.s
+
+.arch_extension sve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: rax1 z0.d, z0.d, z0.d
+
+.arch_extension bitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: bgrp z21.s, z10.s, z21.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-cpu-negative.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-cpu-negative.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-cpu-negative.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-cpu-negative.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,31 @@
+// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.cpu generic+sve2
+.cpu generic+nosve2
+tbx z0.b, z1.b, z2.b
+// CHECK: error: instruction requires: sve2
+// CHECK-NEXT: tbx z0.b, z1.b, z2.b
+
+.cpu generic+sve2-aes
+.cpu generic+nosve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: error: instruction requires: sve2-aes
+// CHECK-NEXT: aesd z23.b, z23.b, z13.b
+
+.cpu generic+sve2-sm4
+.cpu generic+nosve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: error: instruction requires: sve2-sm4
+// CHECK-NEXT: sm4e z0.s, z0.s, z0.s
+
+.cpu generic+sve2-sha3
+.cpu generic+nosve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: error: instruction requires: sve2-sha3
+// CHECK-NEXT: rax1 z0.d, z0.d, z0.d
+
+.cpu generic+bitperm
+.cpu generic+nobitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: error: instruction requires: bitperm
+// CHECK-NEXT: bgrp z21.s, z10.s, z21.s

Added: llvm/trunk/test/MC/AArch64/SVE2/directive-cpu.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE2/directive-cpu.s?rev=362378&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE2/directive-cpu.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE2/directive-cpu.s Mon Jun  3 03:42:02 2019
@@ -0,0 +1,21 @@
+// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s
+
+.cpu generic+sve2
+tbx z0.b, z1.b, z2.b
+// CHECK: tbx z0.b, z1.b, z2.b
+
+.cpu generic+sve2-aes
+aesd z23.b, z23.b, z13.b
+// CHECK: aesd z23.b, z23.b, z13.b
+
+.cpu generic+sve2-sm4
+sm4e z0.s, z0.s, z0.s
+// CHECK: sm4e z0.s, z0.s, z0.s
+
+.cpu generic+sve2-sha3
+rax1 z0.d, z0.d, z0.d
+// CHECK: rax1 z0.d, z0.d, z0.d
+
+.cpu generic+bitperm
+bgrp z21.s, z10.s, z21.s
+// CHECK: bgrp z21.s, z10.s, z21.s




More information about the llvm-commits mailing list