[llvm] r336322 - [AArch64][SVE] Asm: Support for predicated FP rounding instructions.
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 01:38:30 PDT 2018
Author: s.desmalen
Date: Thu Jul 5 01:38:30 2018
New Revision: 336322
URL: http://llvm.org/viewvc/llvm-project?rev=336322&view=rev
Log:
[AArch64][SVE] Asm: Support for predicated FP rounding instructions.
This patch also adds instructions for predicated FP square-root and
reciprocal exponent.
The added instructions are:
- FRINTI Round to integral value (current FPCR rounding mode)
- FRINTX Round to integral value (current FPCR rounding mode, signalling inexact)
- FRINTA Round to integral value (to nearest, with ties away from zero)
- FRINTN Round to integral value (to nearest, with ties to even)
- FRINTZ Round to integral value (toward zero)
- FRINTM Round to integral value (toward minus Infinity)
- FRINTP Round to integral value (toward plus Infinity)
- FSQRT Floating-point square root
- FRECPX Floating-point reciprocal exponent
Added:
llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frecpx.s
llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frinta.s
llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frinti.s
llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintm.s
llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintn.s
llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintp.s
llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintx.s
llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintz.s
llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/fsqrt.s
Modified:
llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
Modified: llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td?rev=336322&r1=336321&r2=336322&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td Thu Jul 5 01:38:30 2018
@@ -716,6 +716,16 @@ let Predicates = [HasSVE] in {
def FCVTZS_ZPmZ_DtoD : sve_fp_2op_p_zd<0b1111110, "fcvtzs", ZPR64, ZPR64>;
def FCVTZU_ZPmZ_DtoD : sve_fp_2op_p_zd<0b1111111, "fcvtzu", ZPR64, ZPR64>;
+ defm FRINTN_ZPmZ : sve_fp_2op_p_zd_HSD<0b00000, "frintn">;
+ defm FRINTP_ZPmZ : sve_fp_2op_p_zd_HSD<0b00001, "frintp">;
+ defm FRINTM_ZPmZ : sve_fp_2op_p_zd_HSD<0b00010, "frintm">;
+ defm FRINTZ_ZPmZ : sve_fp_2op_p_zd_HSD<0b00011, "frintz">;
+ defm FRINTA_ZPmZ : sve_fp_2op_p_zd_HSD<0b00100, "frinta">;
+ defm FRINTX_ZPmZ : sve_fp_2op_p_zd_HSD<0b00110, "frintx">;
+ defm FRINTI_ZPmZ : sve_fp_2op_p_zd_HSD<0b00111, "frinti">;
+ defm FRECPX_ZPmZ : sve_fp_2op_p_zd_HSD<0b01100, "frecpx">;
+ defm FSQRT_ZPmZ : sve_fp_2op_p_zd_HSD<0b01101, "fsqrt">;
+
// InstAliases
def : InstAlias<"mov $Zd, $Zn",
(ORR_ZZZ ZPR64:$Zd, ZPR64:$Zn, ZPR64:$Zn), 1>;
Modified: llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td?rev=336322&r1=336321&r2=336322&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td (original)
+++ llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td Thu Jul 5 01:38:30 2018
@@ -1018,7 +1018,12 @@ class sve_fp_2op_p_zd<bits<7> opc, strin
let Constraints = "$Zd = $_Zd";
}
-
+multiclass sve_fp_2op_p_zd_HSD<bits<5> opc, string asm> {
+ def _H : sve_fp_2op_p_zd<{ 0b01, opc }, asm, ZPR16, ZPR16>;
+ def _S : sve_fp_2op_p_zd<{ 0b10, opc }, asm, ZPR32, ZPR32>;
+ def _D : sve_fp_2op_p_zd<{ 0b11, opc }, asm, ZPR64, ZPR64>;
+}
+
//===----------------------------------------------------------------------===//
// SVE Integer Arithmetic - Binary Predicated Group
//===----------------------------------------------------------------------===//
Added: llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frecpx z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frecpx z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frecpx z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frecpx z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frecpx z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frecpx z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frecpx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frecpx.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frecpx.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frecpx.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frecpx z31.h, p7/m, z31.h
+// CHECK-INST: frecpx z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x4c,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 4c 65 <unknown>
+
+frecpx z31.s, p7/m, z31.s
+// CHECK-INST: frecpx z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x8c,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 8c 65 <unknown>
+
+frecpx z31.d, p7/m, z31.d
+// CHECK-INST: frecpx z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xcc,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf cc 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frinta z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frinta z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frinta z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frinta z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frinta z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frinta z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frinta.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frinta.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frinta.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frinta.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frinta z31.h, p7/m, z31.h
+// CHECK-INST: frinta z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x44,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 44 65 <unknown>
+
+frinta z31.s, p7/m, z31.s
+// CHECK-INST: frinta z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x84,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 84 65 <unknown>
+
+frinta z31.d, p7/m, z31.d
+// CHECK-INST: frinta z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc4,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c4 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frinti z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frinti z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frinti z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frinti z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frinti z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frinti z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frinti.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frinti.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frinti.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frinti.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frinti z31.h, p7/m, z31.h
+// CHECK-INST: frinti z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x47,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 47 65 <unknown>
+
+frinti z31.s, p7/m, z31.s
+// CHECK-INST: frinti z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x87,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 87 65 <unknown>
+
+frinti z31.d, p7/m, z31.d
+// CHECK-INST: frinti z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc7,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c7 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frintm z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frintm z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintm z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frintm z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintm z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frintm z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frintm.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintm.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintm.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintm.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frintm z31.h, p7/m, z31.h
+// CHECK-INST: frintm z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x42,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 42 65 <unknown>
+
+frintm z31.s, p7/m, z31.s
+// CHECK-INST: frintm z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x82,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 82 65 <unknown>
+
+frintm z31.d, p7/m, z31.d
+// CHECK-INST: frintm z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc2,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c2 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frintn z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frintn z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintn z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frintn z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintn z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frintn z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frintn.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintn.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintn.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintn.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frintn z31.h, p7/m, z31.h
+// CHECK-INST: frintn z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x40,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 40 65 <unknown>
+
+frintn z31.s, p7/m, z31.s
+// CHECK-INST: frintn z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x80,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 80 65 <unknown>
+
+frintn z31.d, p7/m, z31.d
+// CHECK-INST: frintn z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc0,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c0 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frintp z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frintp z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintp z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frintp z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintp z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frintp z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frintp.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintp.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintp.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintp.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frintp z31.h, p7/m, z31.h
+// CHECK-INST: frintp z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x41,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 41 65 <unknown>
+
+frintp z31.s, p7/m, z31.s
+// CHECK-INST: frintp z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x81,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 81 65 <unknown>
+
+frintp z31.d, p7/m, z31.d
+// CHECK-INST: frintp z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc1,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c1 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frintx z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frintx z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintx z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frintx z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintx z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frintx z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frintx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintx.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintx.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintx.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frintx z31.h, p7/m, z31.h
+// CHECK-INST: frintx z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x46,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 46 65 <unknown>
+
+frintx z31.s, p7/m, z31.s
+// CHECK-INST: frintx z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x86,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 86 65 <unknown>
+
+frintx z31.d, p7/m, z31.d
+// CHECK-INST: frintx z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc6,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c6 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+frintz z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: frintz z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintz z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: frintz z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+frintz z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: frintz z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/frintz.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/frintz.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/frintz.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/frintz.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+frintz z31.h, p7/m, z31.h
+// CHECK-INST: frintz z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x43,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 43 65 <unknown>
+
+frintz z31.s, p7/m, z31.s
+// CHECK-INST: frintz z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x83,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 83 65 <unknown>
+
+frintz z31.d, p7/m, z31.d
+// CHECK-INST: frintz z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xc3,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf c3 65 <unknown>
Added: llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,16 @@
+// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s
+
+fsqrt z0.b, p0/m, z0.b
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
+// CHECK-NEXT: fsqrt z0.b, p0/m, z0.b
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+fsqrt z0.s, p0/z, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
+// CHECK-NEXT: fsqrt z0.s, p0/z, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+fsqrt z0.s, p8/m, z0.s
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]
+// CHECK-NEXT: fsqrt z0.s, p8/m, z0.s
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
Added: llvm/trunk/test/MC/AArch64/SVE/fsqrt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/fsqrt.s?rev=336322&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/fsqrt.s (added)
+++ llvm/trunk/test/MC/AArch64/SVE/fsqrt.s Thu Jul 5 01:38:30 2018
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
+// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
+// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
+// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
+
+fsqrt z31.h, p7/m, z31.h
+// CHECK-INST: fsqrt z31.h, p7/m, z31.h
+// CHECK-ENCODING: [0xff,0xbf,0x4d,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 4d 65 <unknown>
+
+fsqrt z31.s, p7/m, z31.s
+// CHECK-INST: fsqrt z31.s, p7/m, z31.s
+// CHECK-ENCODING: [0xff,0xbf,0x8d,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf 8d 65 <unknown>
+
+fsqrt z31.d, p7/m, z31.d
+// CHECK-INST: fsqrt z31.d, p7/m, z31.d
+// CHECK-ENCODING: [0xff,0xbf,0xcd,0x65]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: ff bf cd 65 <unknown>
More information about the llvm-commits
mailing list