[PATCH] D138787: [SVE] Tidy up the bfloat matmul instruction classes
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 03:50:56 PST 2022
david-arm created this revision.
david-arm added reviewers: sdesmalen, paulwalker-arm, CarolineConcatto.
Herald added subscribers: ctetreau, psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: All.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
It doesn't really make sense for the bfloat matmul to derive
from sve_bfloat_dot_base, especially since it's not used
anywhere else.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138787
Files:
llvm/lib/Target/AArch64/SVEInstrFormats.td
Index: llvm/lib/Target/AArch64/SVEInstrFormats.td
===================================================================
--- llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -8297,21 +8297,6 @@
// SVE BFloat16 Group
//===----------------------------------------------------------------------===//
-class sve_bfloat_dot_base<bits<2> opc, string asm, string ops, dag iops>
-: I<(outs ZPR32:$Zda), iops, asm, ops, "", []>, Sched<[]> {
- bits<5> Zda;
- bits<5> Zn;
- let Inst{31-21} = 0b01100100011;
- let Inst{15-14} = opc;
- let Inst{13-10} = 0b0000;
- let Inst{9-5} = Zn;
- let Inst{4-0} = Zda;
-
- let Constraints = "$Zda = $_Zda";
- let DestructiveInstType = DestructiveOther;
- let ElementSize = ElementSizeH;
-}
-
class sve_float_dot<bit bf, string asm>
: I<(outs ZPR32:$Zda), (ins ZPR32:$_Zda, ZPR16:$Zn, ZPR16:$Zm),
asm, "\t$Zda, $Zn, $Zm", "", []>, Sched<[]> {
@@ -8396,16 +8381,26 @@
}
class sve_bfloat_matmul_longvecl_idx<bit BT, bit sub, string asm>
-: sve_bfloat_dot_base<0b01, asm, "\t$Zda, $Zn, $Zm$iop",
- (ins ZPR32:$_Zda, ZPR16:$Zn, ZPR3b16:$Zm, VectorIndexH:$iop)> {
- bits<3> iop;
+: I<(outs ZPR32:$Zda), (ins ZPR32:$_Zda, ZPR16:$Zn, ZPR3b16:$Zm, VectorIndexH:$iop),
+ asm, "\t$Zda, $Zn, $Zm$iop", "", []>, Sched<[]> {
+ bits<5> Zda;
+ bits<5> Zn;
bits<3> Zm;
- let Inst{23} = 0b1;
+ bits<3> iop;
+ let Inst{31-21} = 0b01100100111;
let Inst{20-19} = iop{2-1};
let Inst{18-16} = Zm;
+ let Inst{15-14} = 0b01;
let Inst{13} = sub;
+ let Inst{12} = 0b0;
let Inst{11} = iop{0};
let Inst{10} = BT;
+ let Inst{9-5} = Zn;
+ let Inst{4-0} = Zda;
+
+ let Constraints = "$Zda = $_Zda";
+ let DestructiveInstType = DestructiveOther;
+ let ElementSize = ElementSizeH;
}
multiclass sve_bfloat_matmul_longvecl_idx<bit BT, bit sub, string asm, SDPatternOperator op> {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138787.478183.patch
Type: text/x-patch
Size: 1898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221128/2dcad5ef/attachment.bin>
More information about the llvm-commits
mailing list