[PATCH] D88887: [AMDGPU][MC] Improved diagnostics for instructions with missing features

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 10:14:06 PDT 2020


rampitec accepted this revision.
rampitec added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/MC/AMDGPU/gfx1030_err.s:29
 v_mac_f32 v0, v1, v2
-// GFX10: error: instruction not supported on this GPU
+// GFX10: error: operands are not valid for this GPU or mode
 
----------------
dp wrote:
> rampitec wrote:
> > dp wrote:
> > > rampitec wrote:
> > > > It does not seem right, this instruction is really unsupported.
> > > Exactly. I've already filed a bug [47741](https://bugs.llvm.org/show_bug.cgi?id=47741).
> > > 
> > > The flag HasMadMacF32Insts is missing in dpp variant table for this opcode.
> > But this is not a dpp variant?
> When an error occurs, parser first calls `checkUnsupportedInstruction` to check if the specified instruction is supported or not. And because the mnemonic is found in the 'dpp' table, the instruction is considered supported. And it is indeed supported, because 
> 
>     v_mac_f32 v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
> 
> is assembled w/o errors for GFX1030. 
> 
> This leads us to handling Match_MissingFeature case. We got a match with DEFAULT variant of this instruction but this variant do require HasMadMacF32Insts flag. So for parser it looks like instruction is valid but operands are not.
OK, thanks for the explanation. I hope it will be fixed soon anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88887/new/

https://reviews.llvm.org/D88887



More information about the llvm-commits mailing list