@@ -1431,38 +1431,12 @@ defm V_CVT_F32_BF8 : VOP1_Real_NoDstSel_SDWA_gfx9<0x55>;
14311431defm V_CVT_PK_F32_FP8 : VOP1_Real_NoDstSel_SDWA_gfx9<0x56>;
14321432defm V_CVT_PK_F32_BF8 : VOP1_Real_NoDstSel_SDWA_gfx9<0x57>;
14331433
1434- //===----------------------------------------------------------------------===//
1435- // GFX10
1436- //===----------------------------------------------------------------------===//
1437-
1438- let OtherPredicates = [isGFX10Only] in {
1439- def : GCNPat <
1434+ class MovDPP8Pattern<Predicate Pred, Instruction Inst> : GCNPat <
14401435 (i32 (int_amdgcn_mov_dpp8 i32:$src, timm:$dpp8)),
1441- (V_MOV_B32_dpp8_gfx10 VGPR_32:$src, VGPR_32:$src,
1442- (as_i32timm $dpp8), (i32 DPP8Mode.FI_0))
1443- >;
1444- } // End OtherPredicates = [isGFX10Only]
1445-
1446- //===----------------------------------------------------------------------===//
1447- // GFX11
1448- //===----------------------------------------------------------------------===//
1449-
1450- let OtherPredicates = [isGFX11Only] in {
1451- def : GCNPat <
1452- (i32 (int_amdgcn_mov_dpp8 i32:$src, timm:$dpp8)),
1453- (V_MOV_B32_dpp8_gfx11 VGPR_32:$src, VGPR_32:$src,
1454- (as_i32timm $dpp8), (i32 DPP8Mode.FI_0))
1455- >;
1456- } // End OtherPredicates = [isGFX11Only]
1457-
1458- //===----------------------------------------------------------------------===//
1459- // GFX12
1460- //===----------------------------------------------------------------------===//
1436+ (Inst VGPR_32:$src, VGPR_32:$src, (as_i32timm $dpp8), (i32 DPP8Mode.FI_0))> {
1437+ let OtherPredicates = [Pred];
1438+ }
14611439
1462- let OtherPredicates = [isGFX12Only] in {
1463- def : GCNPat <
1464- (i32 (int_amdgcn_mov_dpp8 i32:$src, timm:$dpp8)),
1465- (V_MOV_B32_dpp8_gfx12 VGPR_32:$src, VGPR_32:$src,
1466- (as_i32timm $dpp8), (i32 DPP8Mode.FI_0))
1467- >;
1468- } // End OtherPredicates = [isGFX12Only]
1440+ def : MovDPP8Pattern<isGFX10Only, V_MOV_B32_dpp8_gfx10>;
1441+ def : MovDPP8Pattern<isGFX11Only, V_MOV_B32_dpp8_gfx11>;
1442+ def : MovDPP8Pattern<isGFX12Only, V_MOV_B32_dpp8_gfx12>;
0 commit comments