[llvm] 36141ca - [SVE] Tidy up the bfloat matmul instruction classes
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 05:17:19 PST 2022
Author: David Sherwood
Date: 2022-11-28T13:17:12Z
New Revision: 36141ca0b35d742d4a39ea3a6ddfc2c6ee5e5e34
URL: https://github.com/llvm/llvm-project/commit/36141ca0b35d742d4a39ea3a6ddfc2c6ee5e5e34
DIFF: https://github.com/llvm/llvm-project/commit/36141ca0b35d742d4a39ea3a6ddfc2c6ee5e5e34.diff
LOG: [SVE] Tidy up the bfloat matmul instruction classes
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.
Differential Revision: https://reviews.llvm.org/D138787
Added:
Modified:
llvm/lib/Target/AArch64/SVEInstrFormats.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/SVEInstrFormats.td b/llvm/lib/Target/AArch64/SVEInstrFormats.td
index 3177917e7230..bb6217235fb9 100644
--- a/llvm/lib/Target/AArch64/SVEInstrFormats.td
+++ b/llvm/lib/Target/AArch64/SVEInstrFormats.td
@@ -8297,21 +8297,6 @@ multiclass sve2_crypto_unary_op<bit opc, string asm, SDPatternOperator op> {
// 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 @@ multiclass sve_bfloat_matmul_longvecl<bit BT, bit sub, string asm, SDPatternOper
}
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> {
More information about the llvm-commits
mailing list