@@ -658,6 +658,11 @@ let Constraints = "$vdst = $src2",
658
658
defm V_DOT2C_F32_F16 : VOP2Inst_e32<"v_dot2c_f32_f16", VOP_DOT_ACC_F32_V2F16>;
659
659
let SubtargetPredicate = HasDot6Insts in
660
660
defm V_DOT4C_I32_I8 : VOP2Inst_e32<"v_dot4c_i32_i8", VOP_DOT_ACC_I32_I32>;
661
+
662
+ let SubtargetPredicate = HasDot4Insts in
663
+ defm V_DOT2C_I32_I16 : VOP2Inst_e32<"v_dot2c_i32_i16", VOP_DOT_ACC_I32_I32>;
664
+ let SubtargetPredicate = HasDot3Insts in
665
+ defm V_DOT8C_I32_I4 : VOP2Inst_e32<"v_dot8c_i32_i4", VOP_DOT_ACC_I32_I32>;
661
666
}
662
667
663
668
let AddedComplexity = 30 in {
@@ -673,6 +678,18 @@ let AddedComplexity = 30 in {
673
678
> {
674
679
let SubtargetPredicate = HasDot6Insts;
675
680
}
681
+ def : GCNPat<
682
+ (i32 (int_amdgcn_sdot2 v2i16:$src0, v2i16:$src1, i32:$src2, (i1 DSTCLAMP.NONE))),
683
+ (i32 (V_DOT2C_I32_I16_e32 $src0, $src1, $src2))
684
+ > {
685
+ let SubtargetPredicate = HasDot4Insts;
686
+ }
687
+ def : GCNPat<
688
+ (i32 (int_amdgcn_sdot8 i32:$src0, i32:$src1, i32:$src2, (i1 DSTCLAMP.NONE))),
689
+ (i32 (V_DOT8C_I32_I4_e32 $src0, $src1, $src2))
690
+ > {
691
+ let SubtargetPredicate = HasDot3Insts;
692
+ }
676
693
} // End AddedComplexity = 30
677
694
678
695
let SubtargetPredicate = isGFX10Plus in {
@@ -1536,21 +1553,34 @@ defm V_XNOR_B32 : VOP2_Real_e32e64_vi <0x3d>;
1536
1553
1537
1554
} // End SubtargetPredicate = HasDLInsts
1538
1555
1556
+ multiclass VOP2_Real_DOT_ACC_gfx9<bits<6> op> : VOP2_Real_e32_vi<op> {
1557
+ def _dpp : VOP2_DPP<op, !cast<VOP2_Pseudo>(NAME#"_e32")>;
1558
+ }
1559
+
1539
1560
multiclass VOP2_Real_DOT_ACC_gfx10<bits<6> op> :
1540
1561
VOP2_Real_e32_gfx10<op>,
1541
1562
VOP2_Real_dpp_gfx10<op>,
1542
1563
VOP2_Real_dpp8_gfx10<op>;
1543
1564
1544
1565
let SubtargetPredicate = HasDot5Insts in {
1566
+ defm V_DOT2C_F32_F16 : VOP2_Real_DOT_ACC_gfx9<0x37>;
1545
1567
// NB: Opcode conflicts with V_DOT8C_I32_I4
1546
1568
// This opcode exists in gfx 10.1* only
1547
1569
defm V_DOT2C_F32_F16 : VOP2_Real_DOT_ACC_gfx10<0x02>;
1548
1570
}
1549
1571
1550
1572
let SubtargetPredicate = HasDot6Insts in {
1573
+ defm V_DOT4C_I32_I8 : VOP2_Real_DOT_ACC_gfx9<0x39>;
1551
1574
defm V_DOT4C_I32_I8 : VOP2_Real_DOT_ACC_gfx10<0x0d>;
1552
1575
}
1553
1576
1577
+ let SubtargetPredicate = HasDot4Insts in {
1578
+ defm V_DOT2C_I32_I16 : VOP2_Real_DOT_ACC_gfx9<0x38>;
1579
+ }
1580
+ let SubtargetPredicate = HasDot3Insts in {
1581
+ defm V_DOT8C_I32_I4 : VOP2_Real_DOT_ACC_gfx9<0x3a>;
1582
+ }
1583
+
1554
1584
let SubtargetPredicate = HasPkFmacF16Inst in {
1555
1585
defm V_PK_FMAC_F16 : VOP2_Real_e32_vi<0x3c>;
1556
1586
} // End SubtargetPredicate = HasPkFmacF16Inst
0 commit comments