[PATCH] D136443: X86: use soft-float ABI for fp16 libcalls on Darwin

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 05:40:04 PDT 2022


t.p.northover created this revision.
Herald added subscribers: pengfei, hiraditya, mcrosier.
Herald added a project: All.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

We've been shipping implementations of fp16 libcalls in MacOS since 10.10 in 2014 I believe, and there are apps around using them so for the libcall emulation we need to stick with the old ABI that uses GPRs. We think normal function calls should be unaffected.

Fortunately it's not that big of a problem since performance is going to be terrible anyway, just a bit of an annoyance in ISelLowering. The alternative implementation I considered was adding a new calling convention and using `setLibcallCallingConv`, less code (and more obviously correct if-conditions) but puts gory details into `include`. I'd be happy to switch if people think I went the wrong way.

There's a bit of test churn as I switched the generic failures over to using a triple with the common case rather than this exceptional behaviour, and that changed some of the names and exact comment format.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136443

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/fp-round.ll
  llvm/test/CodeGen/X86/fp-roundeven.ll
  llvm/test/CodeGen/X86/half-constrained.ll
  llvm/test/CodeGen/X86/half-darwin.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136443.469542.patch
Type: text/x-patch
Size: 76597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/e5fcd726/attachment.bin>


More information about the llvm-commits mailing list