[PATCH] D50913: [FPEnv] Don't need copysign/fabs/fneg constrained intrinsics

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 04:47:52 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D50913#1207078, @arsenm wrote:

> In https://reviews.llvm.org/D50913#1206536, @spatel wrote:
>
> > In https://reviews.llvm.org/D50913#1206373, @cameron.mcinally wrote:
> >
> > > Cool, I like that idea. I'll let this sit for a day or so to see if there are further comments. If not, I'll start a discussion on llvm-dev for a wider audience.
> >
> >
> > I think fneg as an IR instruction or intrinsic has come up for discussion before, but I don't know why it wasn't implemented at the time. An intrinsic is the lighter weight solution and would line up with the similar:
> >  http://llvm.org/docs/LangRef.html#llvm-copysign-intrinsic
> >  http://llvm.org/docs/LangRef.html#llvm-fabs-intrinsic
> >
> > Any reason to prefer an actual instruction over an intrinsic?
>
>
> I thjnk there’s unnecessary resistance to adding new instructions, but they are nicer to deal with. The existing set of basic operators are instructions, so fneg should be as well. They’re common enough to justify it. Isn’t the representation of intrinsic calls more expensive? I’d prefer if we had more of the IEEE ops as full instructions, like fma and fabs


Ok - those seem like good arguments. This patch/topic should be raised on llvm-dev, so others can comment.


Repository:
  rL LLVM

https://reviews.llvm.org/D50913





More information about the llvm-commits mailing list