[PATCH] D67275: GlobalISel: Add G_FMAD instruction

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 08:45:42 PDT 2019


aditya_nandakumar added a comment.

In D67275#1660966 <https://reviews.llvm.org/D67275#1660966>, @arsenm wrote:

> In D67275#1660923 <https://reviews.llvm.org/D67275#1660923>, @aditya_nandakumar wrote:
>
> > In D67275#1660914 <https://reviews.llvm.org/D67275#1660914>, @arsenm wrote:
> >
> > > In D67275#1660898 <https://reviews.llvm.org/D67275#1660898>, @aditya_nandakumar wrote:
> > >
> > > > Looks good. Is this something that's only produced during legalization of targets?
> > >
> > >
> > > It's produced by optimization combines in the DAG mostly, but AMDGPU does use this in a couple custom legalizations
> >
> >
> > If this is used only by one target (AMDGPU) (and does not require further legalizations), one alternative could be making this a target pseudo.
>
>
> It's already a generic node for the DAG. ARM could use it, but doesn't. In practice it's a huge pain to make this target specific, since it shares most combines with FMA.


Makes sense.

> We also do have a problem now where we don't really have an equivalent of target specific nodes in GlobalISel. Intrinsics are close, but don't quite fill the purpose and would litter the IR intrinsic namespace

The other alternative is to use Target Pseudo instructions with generic operands and it's selectable, but comes with it's drawbacks of not being able to further legalize.


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

https://reviews.llvm.org/D67275





More information about the llvm-commits mailing list