summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64
diff options
context:
space:
mode:
authorCullen Rhodes <cullen.rhodes@arm.com>2019-05-31 09:13:55 +0000
committerCullen Rhodes <cullen.rhodes@arm.com>2019-05-31 09:13:55 +0000
commit0fc3a0739850fd84ec910046b90514d0c97f2420 (patch)
tree869b9e62d8372f1a2bef8d5fa82695f8c9a8dffb /llvm/lib/Target/AArch64
parent087d1337f8a9d080cd9aaafbbbfcce4eff532784 (diff)
downloadbcm5719-llvm-0fc3a0739850fd84ec910046b90514d0c97f2420.tar.gz
bcm5719-llvm-0fc3a0739850fd84ec910046b90514d0c97f2420.zip
[AArch64][SVE2] Asm: support WHILE instructions
Summary: Patch adds support for the following instructions: * WHILEGE, WHILEGT, WHILEHS, WHILEHI, WHILEWR, WHILERW The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: chill Differential Revision: https://reviews.llvm.org/D62601 llvm-svn: 362215
Diffstat (limited to 'llvm/lib/Target/AArch64')
-rw-r--r--llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td15
-rw-r--r--llvm/lib/Target/AArch64/SVEInstrFormats.td26
2 files changed, 41 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
index 6a6fedd0303..79ab42f4c08 100644
--- a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
@@ -1371,6 +1371,21 @@ let Predicates = [HasSVE2] in {
// SVE table lookup (three sources)
defm TBL_ZZZZ : sve2_int_perm_tbl<"tbl">;
defm TBX_ZZZ : sve2_int_perm_tbx<"tbx">;
+
+ // SVE integer compare scalar count and limit
+ defm WHILEGE_PWW : sve_int_while4_rr<0b000, "whilege">;
+ defm WHILEGT_PWW : sve_int_while4_rr<0b001, "whilegt">;
+ defm WHILEHS_PWW : sve_int_while4_rr<0b100, "whilehs">;
+ defm WHILEHI_PWW : sve_int_while4_rr<0b101, "whilehi">;
+
+ defm WHILEGE_PXX : sve_int_while8_rr<0b000, "whilege">;
+ defm WHILEGT_PXX : sve_int_while8_rr<0b001, "whilegt">;
+ defm WHILEHS_PXX : sve_int_while8_rr<0b100, "whilehs">;
+ defm WHILEHI_PXX : sve_int_while8_rr<0b101, "whilehi">;
+
+ // SVE pointer conflict compare
+ defm WHILEWR_PXX : sve2_int_while_rr<0b0, "whilewr">;
+ defm WHILERW_PXX : sve2_int_while_rr<0b1, "whilerw">;
}
let Predicates = [HasSVE2AES] in {
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td
index c06b23eca1b..808e5946708 100644
--- a/llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -3270,6 +3270,32 @@ multiclass sve_int_while8_rr<bits<3> opc, string asm> {
def _D : sve_int_while_rr<0b11, { 1, opc }, asm, GPR64, PPR64>;
}
+class sve2_int_while_rr<bits<2> sz8_64, bits<1> rw, string asm,
+ PPRRegOp pprty>
+: I<(outs pprty:$Pd), (ins GPR64:$Rn, GPR64:$Rm),
+ asm, "\t$Pd, $Rn, $Rm",
+ "", []>, Sched<[]> {
+ bits<4> Pd;
+ bits<5> Rm;
+ bits<5> Rn;
+ let Inst{31-24} = 0b00100101;
+ let Inst{23-22} = sz8_64;
+ let Inst{21} = 0b1;
+ let Inst{20-16} = Rm;
+ let Inst{15-10} = 0b001100;
+ let Inst{9-5} = Rn;
+ let Inst{4} = rw;
+ let Inst{3-0} = Pd;
+
+ let Defs = [NZCV];
+}
+
+multiclass sve2_int_while_rr<bits<1> rw, string asm> {
+ def _B : sve2_int_while_rr<0b00, rw, asm, PPR8>;
+ def _H : sve2_int_while_rr<0b01, rw, asm, PPR16>;
+ def _S : sve2_int_while_rr<0b10, rw, asm, PPR32>;
+ def _D : sve2_int_while_rr<0b11, rw, asm, PPR64>;
+}
//===----------------------------------------------------------------------===//
// SVE Floating Point Fast Reduction Group
OpenPOWER on IntegriCloud