[PATCH] D152718: [SelectionDAG][AArch64] Legalize FMAXIMUM/FMINIMUM

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 09:04:24 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4041
                     RTLIB::FMAX_F80, RTLIB::FMAX_F128,
                     RTLIB::FMAX_PPCF128, Results);
     break;
----------------
These libcalls follow the semantics of FMINNUM/FMAXNUM, we can't reuse them for FMINIMUM/FMAXIMUM.

I don't think there are any libcalls for this, so I think we need to always expand as a fallback, not libcall legalize. Of course, that runs into the problem that we don't even have a default expansion for these nodes...


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4794
+  case ISD::FMINIMUM:
+  case ISD::FMAXIMUM:
   case ISD::FPOW:
----------------
This part should be fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152718



More information about the llvm-commits mailing list