This patch optimizes ISD::LRINT and ISD::LLRINT to frintx plus
fcvtzs. It currently only handles the scalar version.
This patch depends on https://reviews.llvm.org/D62017.
Paths
| Differential D62018
[AArch64] Handle ISD::LRINT and ISD::LLRINT ClosedPublic Authored by zatrazz on May 16 2019, 11:26 AM.
Details Summary This patch optimizes ISD::LRINT and ISD::LLRINT to frintx plus This patch depends on https://reviews.llvm.org/D62017.
Diff Detail Event Timelinemstorsjo added inline comments.
Comment Actions Updated patch based on previous comments. Add a pattern to handle i32 return and a testcase for Windows. Comment Actions
Sorry, I was away for a bit. Yes, it looks good wrt Windows now - thanks for taking the time to fix it! Closed by commit rL361877: [AArch64] Handle ISD::LRINT and ISD::LLRINT (authored by azanella). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 200563 llvm/include/llvm/Target/TargetSelectionDAG.td
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/test/CodeGen/AArch64/llrint-conv.ll
llvm/test/CodeGen/AArch64/lrint-conv-win.ll
llvm/test/CodeGen/AArch64/lrint-conv.ll
|
Please add patterns for returning i32 as well; the original C standard math function, which is turned into the llvm IR intrinsic, returns long, which is 32 bit on windows platforms. See D62108 for a fix for the same for lround.