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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 12:33:52 PDT 2018


arsenm added a comment.

In https://reviews.llvm.org/D50913#1206314, @cameron.mcinally wrote:

> So LangRef says that there is no explicit fneg:
>
> "Note that the ‘fsub’ instruction is used to represent the ‘fneg’ instruction present in most other intermediate representations."
>
> But this doesn't seem to be the case in IRBuilder. I.e.: CreateFNeg(...)
>
> Perhaps separating the FNeg and FSub operators is a good solution. And also removing all the xforms between the two. That makes more sense since fneg really *shouldn't* be constrained (it's just a bitwise operation).


The IRBuilder is just a convenience wrapper. We also have the pattern matching or m_Fneg(), so I don't think it should be too difficult to introduce a proper FNeg instruction since most of the uses are hidden in these anyway


Repository:
  rL LLVM

https://reviews.llvm.org/D50913





More information about the llvm-commits mailing list