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

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 09:04:23 PDT 2020


qiucf marked an inline comment as done.
qiucf added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16242
+  // (fnmsub (fneg a) b c) => (fma a b c)
+  if (SDValue NegN0 = getCheaperNegatedExpression(N0, DAG, LegalOps, CodeSize))
+    return DAG.getNode(InvertOpCode(Opc), Loc, VT, NegN0, N1, N2, Flags);
----------------
steven.zhang wrote:
> Can we move all these logic into getNegatedExpression so that more opportunity will be found?
Removing main part of these logic into `getNegatedExpression` makes code cleaner. But `FNMSUB` nodes will never try negate unless we combine it?


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