summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCullen Rhodes <cullen.rhodes@arm.com>2019-05-24 09:28:27 +0000
committerCullen Rhodes <cullen.rhodes@arm.com>2019-05-24 09:28:27 +0000
commit8bcea9daaa6236b92ccc4453e398ed46d1f32745 (patch)
tree1a12f4d178d7e29f95746c28dedffb55cbc2b19e /llvm/lib
parent7f1ff68a165a8a593dd96b4e77691a61a91612c5 (diff)
downloadbcm5719-llvm-8bcea9daaa6236b92ccc4453e398ed46d1f32745.tar.gz
bcm5719-llvm-8bcea9daaa6236b92ccc4453e398ed46d1f32745.zip
[AArch64][SVE2] Asm: add integer add/sub long/wide instructions
Summary: Patch adds support for the following instructions: SVE2 integer add/subtract long: * SADDLB, SADDLT, UADDLB, UADDLT, SSUBLB, SSUBLT, USUBLB, USUBLT, SABDLB, SABDLT, UABDLB, UABDLT SVE2 integer add/subtract wide: * SADDWB, SADDWT, UADDWB, UADDWT, SSUBWB, SSUBWT, USUBWB, USUBWT The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D62142 llvm-svn: 361615
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td24
-rw-r--r--llvm/lib/Target/AArch64/SVEInstrFormats.td6
2 files changed, 30 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
index 9d775ec8d5f..dd14e4ba815 100644
--- a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
@@ -1164,6 +1164,30 @@ let Predicates = [HasSVE2] in {
defm SQRSHLR_ZPmZ : sve2_int_arith_pred<0b011100, "sqrshlr">;
defm UQRSHLR_ZPmZ : sve2_int_arith_pred<0b011110, "uqrshlr">;
+ // SVE2 integer add/subtract long
+ defm SADDLB_ZZZ : sve2_wide_int_arith_long<0b00000, "saddlb">;
+ defm SADDLT_ZZZ : sve2_wide_int_arith_long<0b00001, "saddlt">;
+ defm UADDLB_ZZZ : sve2_wide_int_arith_long<0b00010, "uaddlb">;
+ defm UADDLT_ZZZ : sve2_wide_int_arith_long<0b00011, "uaddlt">;
+ defm SSUBLB_ZZZ : sve2_wide_int_arith_long<0b00100, "ssublb">;
+ defm SSUBLT_ZZZ : sve2_wide_int_arith_long<0b00101, "ssublt">;
+ defm USUBLB_ZZZ : sve2_wide_int_arith_long<0b00110, "usublb">;
+ defm USUBLT_ZZZ : sve2_wide_int_arith_long<0b00111, "usublt">;
+ defm SABDLB_ZZZ : sve2_wide_int_arith_long<0b01100, "sabdlb">;
+ defm SABDLT_ZZZ : sve2_wide_int_arith_long<0b01101, "sabdlt">;
+ defm UABDLB_ZZZ : sve2_wide_int_arith_long<0b01110, "uabdlb">;
+ defm UABDLT_ZZZ : sve2_wide_int_arith_long<0b01111, "uabdlt">;
+
+ // SVE2 integer add/subtract wide
+ defm SADDWB_ZZZ : sve2_wide_int_arith_wide<0b000, "saddwb">;
+ defm SADDWT_ZZZ : sve2_wide_int_arith_wide<0b001, "saddwt">;
+ defm UADDWB_ZZZ : sve2_wide_int_arith_wide<0b010, "uaddwb">;
+ defm UADDWT_ZZZ : sve2_wide_int_arith_wide<0b011, "uaddwt">;
+ defm SSUBWB_ZZZ : sve2_wide_int_arith_wide<0b100, "ssubwb">;
+ defm SSUBWT_ZZZ : sve2_wide_int_arith_wide<0b101, "ssubwt">;
+ defm USUBWB_ZZZ : sve2_wide_int_arith_wide<0b110, "usubwb">;
+ defm USUBWT_ZZZ : sve2_wide_int_arith_wide<0b111, "usubwt">;
+
// SVE2 integer multiply long
defm SQDMULLB_ZZZ : sve2_wide_int_arith_long<0b11000, "sqdmullb">;
defm SQDMULLT_ZZZ : sve2_wide_int_arith_long<0b11001, "sqdmullt">;
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td
index 8b4c00935e5..b741f09886b 100644
--- a/llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -2180,6 +2180,12 @@ multiclass sve2_wide_int_arith_long<bits<5> opc, string asm> {
def _D : sve2_wide_int_arith<0b11, opc, asm, ZPR64, ZPR32, ZPR32>;
}
+multiclass sve2_wide_int_arith_wide<bits<3> opc, string asm> {
+ def _H : sve2_wide_int_arith<0b01, { 0b10, opc }, asm, ZPR16, ZPR16, ZPR8>;
+ def _S : sve2_wide_int_arith<0b10, { 0b10, opc }, asm, ZPR32, ZPR32, ZPR16>;
+ def _D : sve2_wide_int_arith<0b11, { 0b10, opc }, asm, ZPR64, ZPR64, ZPR32>;
+}
+
//===----------------------------------------------------------------------===//
// SVE Integer Arithmetic - Unary Predicated Group
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud