X86: call fp16-conversion functions soft-float on Darwin.
authorTim Northover <tnorthover@apple.com>
Tue, 18 Oct 2022 11:38:14 +0000 (12:38 +0100)
committerTim Northover <tnorthover@apple.com>
Thu, 10 Nov 2022 10:00:01 +0000 (10:00 +0000)
commit2bcf51c7f82ca7752d1bba390a2e0cb5fdd05ca9
tree6619a2762a38ed3d1888b6842cd756b7eadd89aa
parent85f08c4197aea68b2444e6874524b5f8b4067cfd
X86: call fp16-conversion functions soft-float on Darwin.

We've been shipping implementations of these with a soft-float ABI since MacOS
10.10 in 2014 and there's evidence they're in binaries now, so we can't easily
switch to %xmm0.

This emits special libcalls with casts in place to restore the soft-float ABI
for __truncdfhf2, __truncsfhf2, and __extendhfsf2.
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 [new file with mode: 0644]