[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
Tue Oct 25 04:05:49 PDT 2022


t.p.northover added a comment.

> In fact I noticed this problem when switching the ABI and tried to fix it in the compiler-rt side, see D128872 <https://reviews.llvm.org/D128872>.

Ah, interesting. I started out the week with that (or something like it) as my preferred option too. But then I had a grep through my /Applications and found something that would break in just my limited sample (Hex Fiend uses them from libcompiler_rt.dylib, which has been shipping for ages), so decided I there's almost certainly lots more out there I don't know about and couldn't make that change.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:23236
+  if (VT == MVT::f16 && (SVT == MVT::f64 || SVT == MVT::f32) &&
+      !Subtarget.hasFP16() && (SVT == MVT::f64 || !Subtarget.hasF16C())) {
+    if (!Subtarget.getTargetTriple().isOSDarwin())
----------------
pengfei wrote:
> I assume we have set it legal under FP16, why do we still check here?
Apparently not. Assertions all over the place if I remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136443



More information about the llvm-commits mailing list