[llvm] AMDGPU: Use HasFP8ConversionInsts appropriately, NFC (PR #82024)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 11:01:06 PST 2024


================
@@ -898,7 +898,7 @@ multiclass VOP1_Real_NO_DPP_OP_SEL_with_name<GFXGen Gen, bits<9> op,
   VOP1_Real_e32_with_name<Gen, op, opName, asmName>,
   VOP3_Real_with_name<Gen, {0, 1, 1, op{6-0}}, opName, asmName>;
 
-
+let OtherPredicates = [HasFP8ConversionInsts] in {
----------------
changpeng wrote:

> Cc @kosarev @Sisyph
> 
> I don't think there's an easy way to _add_ `UseRealTrue16Insts` to `OtherPredicates`.
> 
> As a workaround you could set `SubtargetPredicate = HasFP8ConversionInsts` here, instead of using `OtherPredicates`? Or perhaps cleaner we could introduce a new `True16Predicate = ...` for use in `VOP3_Real_dpp8_with_name` to avoid overwriting `OtherPredicates`?

Do you think listconcat works for OtherPredicates to add an additional predicate?

SubtargetPredicate does not work for two reasons"
1) SubtargetPredicate is not copied from pseudo to real for dpp8 and dpp16, which means SubtargetPrediacte will get lost (unused) in real.
2) We have the same issue to over-write SubtargetPredicate (Base_VOP3_DPP16)
   let SubtargetPredicate = HasDPP16;



https://github.com/llvm/llvm-project/pull/82024


More information about the llvm-commits mailing list