Skip to content

Commit 21630ef

Browse files
authored
[X86][CodeGen] Restrict F128 lowering to GNU environment (llvm#81664)
Otherwise it breaks some environment like X64 Android that doesn't have f128 functions available in its libc. Followup to llvm#79611.
1 parent f45b9d9 commit 21630ef

File tree

3 files changed

+879
-231
lines changed

3 files changed

+879
-231
lines changed

llvm/lib/CodeGen/TargetLoweringBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) {
123123
setLibcallCallingConv((RTLIB::Libcall)LC, CallingConv::C);
124124

125125
// Use the f128 variants of math functions on x86_64
126-
if (TT.getArch() == Triple::ArchType::x86_64) {
126+
if (TT.getArch() == Triple::ArchType::x86_64 && TT.isGNUEnvironment()) {
127127
setLibcallName(RTLIB::REM_F128, "fmodf128");
128128
setLibcallName(RTLIB::FMA_F128, "fmaf128");
129129
setLibcallName(RTLIB::SQRT_F128, "sqrtf128");

0 commit comments

Comments
 (0)