The missing legalization in SelectionDAG was identified when adding the
intrinsic support for vector reduction for maximum/minimum (D152370).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | ||
---|---|---|
4177 | 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... | |
4958 | This part should be fine. |
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | ||
---|---|---|
4177 | Yes, I thought this RTLIB call might be a problem... and couldn't find any for maximum/minimum. |
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | ||
---|---|---|
4177 | 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. |
addressed review comment. Left in a comment to explain why we cannot legalize using libcalls for F128 and friends.
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...