Skip to content

Commit 1e75668

Browse files
committed
[AMDGPU][MC][GFX1030] Disabled v_mac_f32
See bug 47741 <https://bugs.llvm.org/show_bug.cgi?id=47741> Reviewers: nhaehnle, rampitec Differential Revision: https://reviews.llvm.org/D89000
1 parent 38348fa commit 1e75668

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

llvm/lib/Target/AMDGPU/VOP2Instructions.td

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class VOP2_Real <VOP2_Pseudo ps, int EncodingFamily> :
9292

9393
// copy relevant pseudo op flags
9494
let SubtargetPredicate = ps.SubtargetPredicate;
95+
let OtherPredicates = ps.OtherPredicates;
9596
let AsmMatchConverter = ps.AsmMatchConverter;
9697
let AsmVariantName = ps.AsmVariantName;
9798
let Constraints = ps.Constraints;
@@ -494,14 +495,14 @@ defm V_OR_B32 : VOP2Inst <"v_or_b32", VOP_PAT_GEN<VOP_I32_I32_I32>, or>;
494495
defm V_XOR_B32 : VOP2Inst <"v_xor_b32", VOP_PAT_GEN<VOP_I32_I32_I32>, xor>;
495496

496497
let mayRaiseFPException = 0 in {
497-
let SubtargetPredicate = HasMadMacF32Insts in {
498+
let OtherPredicates = [HasMadMacF32Insts] in {
498499
let Constraints = "$vdst = $src2", DisableEncoding="$src2",
499500
isConvertibleToThreeAddress = 1 in {
500501
defm V_MAC_F32 : VOP2Inst <"v_mac_f32", VOP_MAC_F32>;
501502
}
502503

503504
def V_MADAK_F32 : VOP2_Pseudo <"v_madak_f32", VOP_MADAK_F32, []>;
504-
} // End SubtargetPredicate = HasMadMacF32Insts
505+
} // End OtherPredicates = [HasMadMacF32Insts]
505506
}
506507

507508
// No patterns so that the scalar instructions are always selected.
@@ -873,6 +874,7 @@ class Base_VOP2_DPP16<bits<6> op, VOP2_DPP_Pseudo ps,
873874
VOP2_DPP<op, ps, opName, p, 1> {
874875
let AssemblerPredicate = HasDPP16;
875876
let SubtargetPredicate = HasDPP16;
877+
let OtherPredicates = ps.OtherPredicates;
876878
}
877879

878880
class VOP2_DPP16<bits<6> op, VOP2_DPP_Pseudo ps,
@@ -899,6 +901,7 @@ class VOP2_DPP8<bits<6> op, VOP2_Pseudo ps,
899901

900902
let AssemblerPredicate = HasDPP8;
901903
let SubtargetPredicate = HasDPP8;
904+
let OtherPredicates = ps.OtherPredicates;
902905
}
903906

904907
//===----------------------------------------------------------------------===//

llvm/test/MC/AMDGPU/gfx1030_err.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ s_getreg_b32 s2, hwreg(HW_REG_XNACK_MASK)
2626
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU
2727

2828
v_mac_f32 v0, v1, v2
29-
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode
29+
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
3030

3131
v_mad_f32 v0, v1, v2, v3
3232
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

0 commit comments

Comments
 (0)