diff options
author | Pranav Kant <prka@google.com> | 2024-02-13 16:39:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 16:39:59 -0800 |
commit | 21630efb5a8f411cdf39b15f21a104888145b03f (patch) | |
tree | 715e301c71a7e0b741752b0bc7e1a4eb7fcd62c8 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | f45b9d987dfc5904d4129aa006ab20614b3174e3 (diff) | |
download | llvm-21630efb5a8f411cdf39b15f21a104888145b03f.zip llvm-21630efb5a8f411cdf39b15f21a104888145b03f.tar.gz llvm-21630efb5a8f411cdf39b15f21a104888145b03f.tar.bz2 |
[X86][CodeGen] Restrict F128 lowering to GNU environment (#81664)
Otherwise it breaks some environment like X64 Android that doesn't have
f128 functions available in its libc.
Followup to #79611.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index dc76692..646c0c3 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -123,7 +123,7 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) { setLibcallCallingConv((RTLIB::Libcall)LC, CallingConv::C); // Use the f128 variants of math functions on x86_64 - if (TT.getArch() == Triple::ArchType::x86_64) { + if (TT.getArch() == Triple::ArchType::x86_64 && TT.isGNUEnvironment()) { setLibcallName(RTLIB::REM_F128, "fmodf128"); setLibcallName(RTLIB::FMA_F128, "fmaf128"); setLibcallName(RTLIB::SQRT_F128, "sqrtf128"); |