[llvm] r336387 - This is a recommit of r336322, previously reverted in r336324 due to
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 5 13:21:22 PDT 2018
Author: s.desmalen
Date: Thu Jul 5 13:21:21 2018
New Revision: 336387
URL: http://llvm.org/viewvc/llvm-project?rev=336387&view=rev
Log:
This is a recommit of r336322, previously reverted in r336324 due to
a deficiency in TableGen that has been addressed in r336334.
[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
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frecpx-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frecpx.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frecpx.s
llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frinta-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frinta.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frinta.s
llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frinti-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frinti.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frinti.s
llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintm-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintm.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintm.s
llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintn-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintn.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintn.s
llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintp-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintp.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintp.s
llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintx-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintx.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintx.s
llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintz-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/frintz.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/frintz.s
llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s
- copied unchanged from r336323, llvm/trunk/test/MC/AArch64/SVE/fsqrt-diagnostics.s
llvm/trunk/test/MC/AArch64/SVE/fsqrt.s
- copied unchanged from r336323, 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=336387&r1=336386&r2=336387&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td Thu Jul 5 13:21:21 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=336387&r1=336386&r2=336387&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td (original)
+++ llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td Thu Jul 5 13:21:21 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
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list