================ @@ -219,6 +219,37 @@ class SME2_Tile_Movaz_Pat<string name, SDPatternOperator intrinsic, ValueType ou : Pat<(out_vt (intrinsic tile_imm:$tile, (i32 (tileslice MatrixIndexGPR32Op12_15:$base, index_ty:$offset)))), (!cast<Instruction>(name # _PSEUDO) $tile, $base, $offset)>; + +// FP8 SME FDOT instructions + +// Selection DAG patterns - map to first level of pseudo-instructions (xxx_PSEUDO) +class SME2_FP8_FMLA_FDOT_Index_VG1x2_Pat<string name, SDPatternOperator intrinsic, + ComplexPattern tileslice, Operand offset_ty, Operand imm_ty, + ValueType vt = nxv16i8> + : Pat<(intrinsic (i32 (tileslice MatrixIndexGPR32Op8_11:$base, offset_ty:$offset)), + vt:$Zn1, vt:$Zn2, vt:$Zm, (i32 imm_ty:$i)), + (!cast<Instruction>(name # _PSEUDO) $base, $offset, + (REG_SEQUENCE ZPR2Mul2, vt:$Zn1, zsub0, vt:$Zn2, zsub1), + ZPR4b8:$Zm, imm_ty:$i)>; + +class SME2_FP8_FMLA_FDOT_Index_VG1x4_Pat<string name, SDPatternOperator intrinsic, + ComplexPattern tileslice, Operand offset_ty, Operand imm_ty, + ValueType vt = nxv16i8> + : Pat<(intrinsic (i32 (tileslice MatrixIndexGPR32Op8_11:$base, offset_ty:$offset)), + vt:$Zn1, vt:$Zn2, vt:$Zn3, vt:$Zn4, + vt:$Zm, (i32 imm_ty:$i)), + (!cast<Instruction>(name # _PSEUDO) $base, $offset, + (REG_SEQUENCE ZPR4Mul4, vt:$Zn1, zsub0, vt:$Zn2, zsub1, vt:$Zn3, zsub2, vt:$Zn4, zsub3), + ZPR4b8:$Zm, imm_ty:$i)>; + +class sme2_fp8_fmla_fdot_index_pseudo<string name, Operand offset_ty, RegisterOperand src1_ty, RegisterOperand src2_ty, Operand imm_ty> + : SMEPseudo2Instr<name, 0>, + Pseudo<(outs), (ins MatrixIndexGPR32Op8_11:$Rv, offset_ty:$offs, src1_ty:$Zn, src2_ty:$Zm, imm_ty:$i), []> { + let mayLoad = 1; + let SMEMatrixType = SMEMatrixArray; + let usesCustomInserter = 1; +} ---------------- SpencerAbson wrote:
Similar story here, we can use the existing `sme2_za_array_2op_multi_index_pseudo`. E.g. `def _PSEUDO : sme2_za_array_2op_multi_index_pseudo<NAME, sme_elm_idx0_7, ZZ_b_mul_r, ZPR4b8, VectorIndexH32b_timm, SMEMatrixArray>;` https://github.com/llvm/llvm-project/pull/118492 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits