diff --git a/llvm/lib/Target/AMDGPU/VOP2Instructions.td b/llvm/lib/Target/AMDGPU/VOP2Instructions.td --- a/llvm/lib/Target/AMDGPU/VOP2Instructions.td +++ b/llvm/lib/Target/AMDGPU/VOP2Instructions.td @@ -92,6 +92,7 @@ // copy relevant pseudo op flags let SubtargetPredicate = ps.SubtargetPredicate; + let OtherPredicates = ps.OtherPredicates; let AsmMatchConverter = ps.AsmMatchConverter; let AsmVariantName = ps.AsmVariantName; let Constraints = ps.Constraints; @@ -494,14 +495,14 @@ defm V_XOR_B32 : VOP2Inst <"v_xor_b32", VOP_PAT_GEN, xor>; let mayRaiseFPException = 0 in { -let SubtargetPredicate = HasMadMacF32Insts in { +let OtherPredicates = [HasMadMacF32Insts] in { let Constraints = "$vdst = $src2", DisableEncoding="$src2", isConvertibleToThreeAddress = 1 in { defm V_MAC_F32 : VOP2Inst <"v_mac_f32", VOP_MAC_F32>; } def V_MADAK_F32 : VOP2_Pseudo <"v_madak_f32", VOP_MADAK_F32, []>; -} // End SubtargetPredicate = HasMadMacF32Insts +} // End OtherPredicates = [HasMadMacF32Insts] } // No patterns so that the scalar instructions are always selected. @@ -873,6 +874,7 @@ VOP2_DPP { let AssemblerPredicate = HasDPP16; let SubtargetPredicate = HasDPP16; + let OtherPredicates = ps.OtherPredicates; } class VOP2_DPP16 op, VOP2_DPP_Pseudo ps, @@ -899,6 +901,7 @@ let AssemblerPredicate = HasDPP8; let SubtargetPredicate = HasDPP8; + let OtherPredicates = ps.OtherPredicates; } //===----------------------------------------------------------------------===// diff --git a/llvm/test/MC/AMDGPU/gfx1030_err.s b/llvm/test/MC/AMDGPU/gfx1030_err.s --- a/llvm/test/MC/AMDGPU/gfx1030_err.s +++ b/llvm/test/MC/AMDGPU/gfx1030_err.s @@ -26,7 +26,7 @@ // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU v_mac_f32 v0, v1, v2 -// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode +// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU v_mad_f32 v0, v1, v2, v3 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU