[PATCH] D84287: [SelectionDAG] Make LegalizeDAG lower FNEG using integer ops.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 16:16:43 PDT 2020


arsenm added a comment.

This also needs to be fixed for globalisel to avoid this bug appearing or not depending on other code in the function hitting the fallback



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1574
+  // Expand using integer operations. (We used to expand to FSUB, but that's
+  // not correct in cases involving NaNs.)
+  SDLoc DL(Node);
----------------
The explanation is too vague and not quite correct. It's specifically signaling nans (and also possibly denormal flushing). fsub is a canonicalizing operation, but fneg is not


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84287



More information about the llvm-commits mailing list