Skip to content

Commit ef52bed

Browse files
committed
[AMDGPU] Fix predicates for V_DOT instructions.
Resolves AsmParser ambiguities, e.g., between V_DOT4C_I32_I8_dpp_vi and V_DOT4C_I32_I8_dpp_gfx10. The latter is predicated with isGFX10Only while the first has no subtarget generation predicates. Part of <#69256>.
1 parent eca25bb commit ef52bed

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Target/AMDGPU/VOP2Instructions.td

+5-4
Original file line numberDiff line numberDiff line change
@@ -2512,6 +2512,7 @@ defm V_FMAAK_F32 : VOP2_Real_MADK_gfx940 <0x18>;
25122512
}
25132513

25142514
multiclass VOP2_Real_DOT_ACC_gfx9<bits<6> op> : Base_VOP2_Real_e32e64_vi<op> {
2515+
let SubtargetPredicate = isGFX9Only in
25152516
def _dpp_vi : VOP2_DPP<op, !cast<VOP2_DPP_Pseudo>(NAME#"_dpp")>;
25162517
}
25172518

@@ -2526,22 +2527,22 @@ multiclass VOP2Only_Real_DOT_ACC_gfx10<bits<6> op> : VOP2_Real_dpp_gfx10<op>,
25262527
defm NAME : VOP2_Real_e32_gfx10<op>;
25272528
}
25282529

2529-
let SubtargetPredicate = HasDot5Insts in {
2530+
let OtherPredicates = [HasDot5Insts] in {
25302531
defm V_DOT2C_F32_F16 : VOP2_Real_DOT_ACC_gfx9<0x37>;
25312532
// NB: Opcode conflicts with V_DOT8C_I32_I4
25322533
// This opcode exists in gfx 10.1* only
25332534
defm V_DOT2C_F32_F16 : VOP2Only_Real_DOT_ACC_gfx10<0x02>;
25342535
}
25352536

2536-
let SubtargetPredicate = HasDot6Insts in {
2537+
let OtherPredicates = [HasDot6Insts] in {
25372538
defm V_DOT4C_I32_I8 : VOP2_Real_DOT_ACC_gfx9<0x39>;
25382539
defm V_DOT4C_I32_I8 : VOP2Only_Real_DOT_ACC_gfx10<0x0d>;
25392540
}
25402541

2541-
let SubtargetPredicate = HasDot4Insts in {
2542+
let OtherPredicates = [HasDot4Insts] in {
25422543
defm V_DOT2C_I32_I16 : VOP2_Real_DOT_ACC_gfx9<0x38>;
25432544
}
2544-
let SubtargetPredicate = HasDot3Insts in {
2545+
let OtherPredicates = [HasDot3Insts] in {
25452546
defm V_DOT8C_I32_I4 : VOP2_Real_DOT_ACC_gfx9<0x3a>;
25462547
}
25472548

0 commit comments

Comments
 (0)