[PATCH] D76585: [PowerPC] Require NSZ flag for c-a*b to FNMSUB

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 18:56:43 PDT 2020


steven.zhang added a comment.

In D76585#2009908 <https://reviews.llvm.org/D76585#2009908>, @spatel wrote:

> In D76585#2009259 <https://reviews.llvm.org/D76585#2009259>, @steven.zhang wrote:
>
> > @spatel @RKSimon Do you know that why we didn't have the generic node for FNMSUB/FMSUB as I see the duplicate logic between X86 and PowerPC ?
>
>
> I can't say for sure, but my guess is that target-specific logic could be added without incurring the overhead of general discussion/approval:
>  rG3cb3b0045c62bc6cc <https://reviews.llvm.org/rG3cb3b0045c62bc6cc3ef377144c433a796d48405>
>
> There's also a question of deciding what name corresponds to each math operation. The x86 instructions don't match PPC. For example:
>  [PPC] fnmsub = -(A * B - C)
>  [x86] vfnmsub132sd = -(A * B) - C
>
> It would be nice to have common nodes/optimizations if we can find enough code to share. If we do that, we also need to see if other targets can benefit (AArch64 has fnmsub machine IR).


Thank you for the information. Maybe,we can add fmsub(A*B-C), fnmsub(-A*B-C), fnmadd(-A*B+C). But yes, we need to see if other targets can benefit from this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76585





More information about the llvm-commits mailing list