[llvm] AMDGPU: Use OtherPredicates for v_dot2_bf16_bf16(f16_f16) pseudo (PR #84354)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 12:14:24 PST 2024


changpeng wrote:

> > > > LGTM, but this is really unfortunate. Can we try to address dpp predicates?
> > > 
> > > 
> > > let SubtargetPredicate = HasDPP8;
> > > I am thinking whether we can put hasDPP8 into OtherPredicates (using concat). But we need to be very careful of the ordering this assignment with copy from pseudo to real of OtherPredicates.
> > 
> > 
> > let SubtargetPredicate = HasDPP8; // do we really need? let AssemblerPredicate = HasDPP8;
> > Actually why do we need to set both SubtargetPredicate and AssemblerPredicate? One of them enough? "AssemblerPredicate = HasDPP8" may also have "overriden" issue on the path.
> 
> Imagine you have the same instruction in different targets, so you are using 'SubtargetPredicate = HasFeature' on the pseudo. But the encoding is different, so you this HasFeature is not sufficient, you need to use AssemblerPredicate to distinguish between targets for real instructions.

Is it redundant to to HasDPP8 in both SubtargetPredicate and AssemblerPredicate for a real?
I think it is SubtargetPredicate && AssemblerPredicate


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


More information about the llvm-commits mailing list