Skip to content

Commit 8bcea9d

Browse files
committedMay 24, 2019
[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
1 parent 7f1ff68 commit 8bcea9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1370
-0
lines changed
 

Diff for: ‎llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td

+24
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,30 @@ let Predicates = [HasSVE2] in {
11641164
defm SQRSHLR_ZPmZ : sve2_int_arith_pred<0b011100, "sqrshlr">;
11651165
defm UQRSHLR_ZPmZ : sve2_int_arith_pred<0b011110, "uqrshlr">;
11661166

1167+
// SVE2 integer add/subtract long
1168+
defm SADDLB_ZZZ : sve2_wide_int_arith_long<0b00000, "saddlb">;
1169+
defm SADDLT_ZZZ : sve2_wide_int_arith_long<0b00001, "saddlt">;
1170+
defm UADDLB_ZZZ : sve2_wide_int_arith_long<0b00010, "uaddlb">;
1171+
defm UADDLT_ZZZ : sve2_wide_int_arith_long<0b00011, "uaddlt">;
1172+
defm SSUBLB_ZZZ : sve2_wide_int_arith_long<0b00100, "ssublb">;
1173+
defm SSUBLT_ZZZ : sve2_wide_int_arith_long<0b00101, "ssublt">;
1174+
defm USUBLB_ZZZ : sve2_wide_int_arith_long<0b00110, "usublb">;
1175+
defm USUBLT_ZZZ : sve2_wide_int_arith_long<0b00111, "usublt">;
1176+
defm SABDLB_ZZZ : sve2_wide_int_arith_long<0b01100, "sabdlb">;
1177+
defm SABDLT_ZZZ : sve2_wide_int_arith_long<0b01101, "sabdlt">;
1178+
defm UABDLB_ZZZ : sve2_wide_int_arith_long<0b01110, "uabdlb">;
1179+
defm UABDLT_ZZZ : sve2_wide_int_arith_long<0b01111, "uabdlt">;
1180+
1181+
// SVE2 integer add/subtract wide
1182+
defm SADDWB_ZZZ : sve2_wide_int_arith_wide<0b000, "saddwb">;
1183+
defm SADDWT_ZZZ : sve2_wide_int_arith_wide<0b001, "saddwt">;
1184+
defm UADDWB_ZZZ : sve2_wide_int_arith_wide<0b010, "uaddwb">;
1185+
defm UADDWT_ZZZ : sve2_wide_int_arith_wide<0b011, "uaddwt">;
1186+
defm SSUBWB_ZZZ : sve2_wide_int_arith_wide<0b100, "ssubwb">;
1187+
defm SSUBWT_ZZZ : sve2_wide_int_arith_wide<0b101, "ssubwt">;
1188+
defm USUBWB_ZZZ : sve2_wide_int_arith_wide<0b110, "usubwb">;
1189+
defm USUBWT_ZZZ : sve2_wide_int_arith_wide<0b111, "usubwt">;
1190+
11671191
// SVE2 integer multiply long
11681192
defm SQDMULLB_ZZZ : sve2_wide_int_arith_long<0b11000, "sqdmullb">;
11691193
defm SQDMULLT_ZZZ : sve2_wide_int_arith_long<0b11001, "sqdmullt">;

Diff for: ‎llvm/lib/Target/AArch64/SVEInstrFormats.td

+6
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,12 @@ multiclass sve2_wide_int_arith_long<bits<5> opc, string asm> {
21802180
def _D : sve2_wide_int_arith<0b11, opc, asm, ZPR64, ZPR32, ZPR32>;
21812181
}
21822182

2183+
multiclass sve2_wide_int_arith_wide<bits<3> opc, string asm> {
2184+
def _H : sve2_wide_int_arith<0b01, { 0b10, opc }, asm, ZPR16, ZPR16, ZPR8>;
2185+
def _S : sve2_wide_int_arith<0b10, { 0b10, opc }, asm, ZPR32, ZPR32, ZPR16>;
2186+
def _D : sve2_wide_int_arith<0b11, { 0b10, opc }, asm, ZPR64, ZPR64, ZPR32>;
2187+
}
2188+
21832189
//===----------------------------------------------------------------------===//
21842190
// SVE Integer Arithmetic - Unary Predicated Group
21852191
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)
Please sign in to comment.