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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 09:12: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;
----------------
anna wrote:
> nikic wrote:
> > 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...
> Yes, I thought this RTLIB call might be a problem... and couldn't find any for maximum/minimum.
> I'll document this as an existing bug within the legalization under the original PR and state what you've added here. 
> This also means the vector reduce legalization for f128 and friends described here would not have legalization. I would like to avoid blocking the introduction of the vector reduction intrinsic on that though. 
That's fine. For the purpose of introducing the reduction intrinsics, you can just leave the test cases that currently don't work commented out. These are really independent problems.


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