[X86] Don't lower f16->f80 fpext to libcall on darwin.
authorDavide Italiano <ditaliano@apple.com>
Tue, 22 Nov 2022 20:29:44 +0000 (12:29 -0800)
committerDavide Italiano <ditaliano@apple.com>
Tue, 22 Nov 2022 20:32:22 +0000 (12:32 -0800)
commit0c011335c9c6b0c0598f8fa7393af5e8aad428a2
tree733b6df44a43ceb22a91d04bd1130a9857fad1d8
parentc7631606eb40d445615d3fc6f6599936463bac36
[X86] Don't lower f16->f80 fpext to libcall on darwin.

We don't provide __extendhfxf2, and only have the soft-float
__extendhfsf2 in compiler-rt.  This only changed recently with
655ba9c8a1d2, so this patch reverts back to the previous behavior.

However, the f80->f16 fptrunc is not easily implementable without
the compiler-rt __truncxfhf2, but that has always been true, and
isn't an immediate regression.

Patch by Ahmed Bougacha.

rdar://102194995
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/half-fp80-darwin.ll [new file with mode: 0644]