[llvm] Change `fp128` lowering to use `f128` functions by default (PR #76558)

Trevor Gross via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 27 23:37:47 PDT 2025


https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558

>From d82f053d5ad82ec3685fed7c815ae597d1904c47 Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross at umich.edu>
Date: Fri, 11 Aug 2023 22:16:01 -0400
Subject: [PATCH 1/3] [IR] Add a test for `f128` libcall lowering (NFC)

`f128` intrinsic functions sometimes lower to `long double` library
calls when they instead need to be `f128` versions. Add a test
demonstrating current behavior.
---
 .../CodeGen/Generic/f128-math-lowering.ll     | 327 ++++++++++++++++++
 1 file changed, 327 insertions(+)
 create mode 100644 llvm/test/CodeGen/Generic/f128-math-lowering.ll

diff --git a/llvm/test/CodeGen/Generic/f128-math-lowering.ll b/llvm/test/CodeGen/Generic/f128-math-lowering.ll
new file mode 100644
index 0000000000000..51142eb4254b7
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/f128-math-lowering.ll
@@ -0,0 +1,327 @@
+; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-none -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-musl -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if arm-registered-target %{ llc < %s -mtriple=arm-none-eabi -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if xfail-powerpc-registered-target %{ llc < %s -mtriple=powerpc-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if xfail-powerpc-registered-target %{ llc < %s -mtriple=powerpc64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if riscv-registered-target %{ llc < %s -mtriple=riscv32-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if systemz-registered-target %{ llc < %s -mtriple=s390x-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-S390X %}
+; RUN: %if x86-registered-target %{ llc < %s -mtriple=i686-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if x86-registered-target %{ llc < %s -mtriple=x86_64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+;
+; Verify that fp128 intrinsics only lower to `long double` calls (e.g. sinl) on
+; platforms where 128 and `long double` have the same layout, and where the
+; `*f128` versions are known to not exist. Otherwise, lower to f128 versions
+; (e.g. sinf128).
+;
+; Targets include:
+; * aarch64 (long double == f128, should use ld syms)
+; * arm (long double == f64, should use f128 syms)
+; * s390x (long double == f128, should use ld syms, some hardware support)
+; * x86, x64 (80-bit long double, should use ld syms)
+; * gnu (has f128 symbols on all platforms so we can use those)
+; * musl (no f128 symbols available)
+
+; FIXME: targets are configured so these tests pass, but the output has not
+; yet been corrected.
+
+define fp128 @test_acos(fp128 %a) {
+; CHECK-LABEL:      test_acos:
+; CHECK-F128:       acosf128
+; CHECK-USELD:      acosl
+; CHECK-S390X:      acosl
+start:
+  %0 = tail call fp128 @llvm.acos.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_asin(fp128 %a) {
+; CHECK-LABEL:      test_asin:
+; CHECK-F128:       asinf128
+; CHECK-USELD:      asinl
+; CHECK-S390X:      asinl
+start:
+  %0 = tail call fp128 @llvm.asin.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_atan(fp128 %a) {
+; CHECK-LABEL:      test_atan:
+; CHECK-F128:       atanf128
+; CHECK-USELD:      atanl
+; CHECK-S390X:      atanl
+start:
+  %0 = tail call fp128 @llvm.atan.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_ceil(fp128 %a) {
+; CHECK-LABEL:      test_ceil:
+; CHECK-F128:       ceilf128
+; CHECK-USELD:      ceill
+; CHECK-S390X:      ceill
+start:
+  %0 = tail call fp128 @llvm.ceil.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_copysign(fp128 %a, fp128 %b) {
+; copysign should always get lowered to assembly.
+; CHECK-LABEL:      test_copysign:
+; CHECK-NOT:        copysignf128
+; CHECK-NOT:        copysignl
+start:
+  %0 = tail call fp128 @llvm.copysign.f128(fp128 %a, fp128 %b)
+  ret fp128 %0
+}
+
+define fp128 @test_cos(fp128 %a) {
+; CHECK-LABEL:      test_cos:
+; CHECK-F128:       cosf128
+; CHECK-USELD:      cosl
+; CHECK-S390X:      cosl
+start:
+  %0 = tail call fp128 @llvm.cos.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_exp10(fp128 %a) {
+; CHECK-LABEL:      test_exp10:
+; CHECK-F128:       exp10f128
+; CHECK-USELD:      exp10l
+; CHECK-S390X:      exp10l
+start:
+  %0 = tail call fp128 @llvm.exp10.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_exp2(fp128 %a) {
+; CHECK-LABEL:      test_exp2:
+; CHECK-F128:       exp2f128
+; CHECK-USELD:      exp2l
+; CHECK-S390X:      exp2l
+start:
+  %0 = tail call fp128 @llvm.exp2.f128(fp128 %a)
+  ret fp128 %0
+}
+
+
+define fp128 @test_exp(fp128 %a) {
+; CHECK-LABEL:      test_exp:
+; CHECK-F128:       expf128
+; CHECK-USELD:      expl
+; CHECK-S390X:      expl
+start:
+  %0 = tail call fp128 @llvm.exp.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_fabs(fp128 %a) {
+; fabs should always get lowered to assembly.
+; CHECK-LABEL:      test_fabs:
+; CHECK-NOT:        fabsf128
+; CHECK-NOT:        fabsl
+start:
+  %0 = tail call fp128 @llvm.fabs.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_floor(fp128 %a) {
+; CHECK-LABEL:      test_floor:
+; CHECK-F128:       floorf128
+; CHECK-USELD:      floorl
+; CHECK-S390X:      floorl
+start:
+  %0 = tail call fp128 @llvm.floor.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_fma(fp128 %a, fp128 %b, fp128 %c) {
+; CHECK-LABEL:      test_fma:
+; CHECK-F128:       fmaf128
+; CHECK-USELD:      fmal
+; CHECK-S390X:      fmal
+start:
+  %0 = tail call fp128 @llvm.fma.f128(fp128 %a, fp128 %b, fp128 %c)
+  ret fp128 %0
+}
+
+define { fp128, i32 } @test_frexp(fp128 %a) {
+; CHECK-LABEL:      test_frexp:
+; CHECK-F128:       frexpf128
+; CHECK-USELD:      frexpl
+; CHECK-S390X:      frexpl
+start:
+  %0 = tail call { fp128, i32 } @llvm.frexp.f128(fp128 %a)
+  ret { fp128, i32 } %0
+}
+
+define fp128 @test_ldexp(fp128 %a, i32 %b) {
+; CHECK-LABEL:      test_ldexp:
+; CHECK-F128:       ldexpf128
+; CHECK-USELD:      ldexpl
+; CHECK-S390X:      ldexpl
+start:
+  %0 = tail call fp128 @llvm.ldexp.f128(fp128 %a, i32 %b)
+  ret fp128 %0
+}
+
+define i64 @test_llrint(fp128 %a) {
+; CHECK-LABEL:      test_llrint:
+; CHECK-F128:       llrintf128
+; CHECK-USELD:      llrintl
+; CHECK-S390X:      llrintl
+start:
+  %0 = tail call i64 @llvm.llrint.f128(fp128 %a)
+  ret i64 %0
+}
+
+define i64 @test_llround(fp128 %a) {
+; CHECK-LABEL:      test_llround:
+; CHECK-F128:       llroundf128
+; CHECK-USELD:      llroundl
+; CHECK-S390X:      llroundl
+start:
+  %0 = tail call i64 @llvm.llround.i64.f128(fp128 %a)
+  ret i64 %0
+}
+
+define fp128 @test_log10(fp128 %a) {
+; CHECK-LABEL:      test_log10:
+; CHECK-F128:       log10f128
+; CHECK-USELD:      log10l
+; CHECK-S390X:      log10l
+start:
+  %0 = tail call fp128 @llvm.log10.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_log2(fp128 %a) {
+; CHECK-LABEL:      test_log2:
+; CHECK-F128:       log2f128
+; CHECK-USELD:      log2l
+; CHECK-S390X:      log2l
+start:
+  %0 = tail call fp128 @llvm.log2.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_log(fp128 %a) {
+; CHECK-LABEL:      test_log:
+; CHECK-F128:       logf128
+; CHECK-USELD:      logl
+; CHECK-S390X:      logl
+start:
+  %0 = tail call fp128 @llvm.log.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define i64 @test_lrint(fp128 %a) {
+; CHECK-LABEL:      test_lrint:
+; CHECK-F128:       lrintf128
+; CHECK-USELD:      lrintl
+; CHECK-S390X:      lrintl
+start:
+  %0 = tail call i64 @llvm.lrint.f128(fp128 %a)
+  ret i64 %0
+}
+
+define i64 @test_lround(fp128 %a) {
+; CHECK-LABEL:      test_lround:
+; CHECK-F128:       lroundf128
+; CHECK-USELD:      lroundl
+; CHECK-S390X:      lroundl
+start:
+  %0 = tail call i64 @llvm.lround.i64.f128(fp128 %a)
+  ret i64 %0
+}
+
+define fp128 @test_nearbyint(fp128 %a) {
+; CHECK-LABEL:      test_nearbyint:
+; CHECK-F128:       nearbyintf128
+; CHECK-USELD:      nearbyintl
+; CHECK-S390X:      nearbyintl
+start:
+  %0 = tail call fp128 @llvm.nearbyint.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_pow(fp128 %a, fp128 %b) {
+; CHECK-LABEL:      test_pow:
+; CHECK-F128:       powf128
+; CHECK-USELD:      powl
+; CHECK-S390X:      powl
+start:
+  %0 = tail call fp128 @llvm.pow.f128(fp128 %a, fp128 %b)
+  ret fp128 %0
+}
+
+define fp128 @test_rint(fp128 %a) {
+; CHECK-LABEL:      test_rint:
+; CHECK-F128:       rintf128
+; CHECK-USELD:      rintl
+; CHECK-S390X:      fixbr {{%.*}}, 0, {{%.*}}
+start:
+  %0 = tail call fp128 @llvm.rint.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_roundeven(fp128 %a) {
+; CHECK-LABEL:      test_roundeven:
+; CHECK-F128:       roundevenf128
+; CHECK-USELD:      roundevenl
+; CHECK-S390X:      roundevenl
+start:
+  %0 = tail call fp128 @llvm.roundeven.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_round(fp128 %a) {
+; CHECK-LABEL:      test_round:
+; CHECK-F128:       roundf128
+; CHECK-USELD:      roundl
+; CHECK-S390X:      roundl
+start:
+  %0 = tail call fp128 @llvm.round.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_sin(fp128 %a) {
+; CHECK-LABEL:      test_sin:
+; CHECK-F128:       sinf128
+; CHECK-USELD:      sinl
+; CHECK-S390X:      sinl
+start:
+  %0 = tail call fp128 @llvm.sin.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_sqrt(fp128 %a) {
+; CHECK-LABEL:      test_sqrt:
+; CHECK-F128:       sqrtf128
+; CHECK-USELD:      sqrtl
+; CHECK-S390X:      sqxbr {{%.*}}, {{%.*}}
+start:
+  %0 = tail call fp128 @llvm.sqrt.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_tan(fp128 %a) {
+; CHECK-LABEL:      test_tan:
+; CHECK-F128:       tanf128
+; CHECK-USELD:      tanl
+; CHECK-S390X:      tanl
+start:
+  %0 = tail call fp128 @llvm.tan.f128(fp128 %a)
+  ret fp128 %0
+}
+
+define fp128 @test_trunc(fp128 %a) {
+; CHECK-LABEL:      test_trunc:
+; CHECK-F128:       truncf128
+; CHECK-USELD:      truncl
+; CHECK-S390X:      truncl
+start:
+  %0 = tail call fp128 @llvm.trunc.f128(fp128 %a)
+  ret fp128 %0
+}

>From 3ab8407657113d05ae41707283c702f20d3aa7fb Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross at umich.edu>
Date: Thu, 28 Dec 2023 04:01:22 -0500
Subject: [PATCH 2/3] [IR] Change `fp128` lowering to use `f128` functions by
 default

LLVM currently emits calls to `*l` (`long double`) libm symbols for
`fp128` intrinsics. This works on platforms where `long double` and
`_Float128` are the same type, but is incorrect on many platforms.

Change RuntimeLibcalls such that `*f128` libcalls are used by default,
which is always safe and correct but may not be available. On platforms
where it is likely that `sqrtf128` and similar are not available, keep
the current behavior of lowering to `*l` symbols if `long double` is
`binary128`.

The logic for whether f128 is `long double` is based on the platforms in
Clang that set `LongDoubleFormat` to `llvm::APFloat::IEEEquad`.

Fixes https://github.com/llvm/llvm-project/issues/44744
---
 .../llvm/Analysis/TargetTransformInfoImpl.h   |  37 +++---
 llvm/include/llvm/IR/RuntimeLibcalls.def      | 101 ++++++++--------
 llvm/include/llvm/IR/RuntimeLibcalls.h        |  18 +++
 llvm/include/llvm/TargetParser/Triple.h       |  20 +--
 llvm/lib/IR/RuntimeLibcalls.cpp               | 114 ++++++++++--------
 llvm/lib/Target/Mips/MipsCCState.cpp          |  15 ++-
 llvm/lib/Target/PowerPC/PPCISelLowering.cpp   |  26 ----
 .../WebAssemblyRuntimeLibcallSignatures.cpp   |  47 ++++++++
 llvm/lib/TargetParser/Triple.cpp              |  37 ++++++
 .../CodeGen/Generic/f128-math-lowering.ll     |  15 +--
 10 files changed, 266 insertions(+), 164 deletions(-)

diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
index 990252b1e5743..4cc014aaa6699 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -189,27 +189,28 @@ class TargetTransformInfoImplBase {
 
     // These will all likely lower to a single selection DAG node.
     // clang-format off
-    if (Name == "copysign" || Name == "copysignf" || Name == "copysignl" ||
-        Name == "fabs"  || Name == "fabsf"  || Name == "fabsl" ||
-        Name == "fmin"  || Name == "fminf"  || Name == "fminl" ||
-        Name == "fmax"  || Name == "fmaxf"  || Name == "fmaxl" ||
-        Name == "sin"   || Name == "sinf"   || Name == "sinl"  ||
-        Name == "cos"   || Name == "cosf"   || Name == "cosl"  ||
-        Name == "tan"   || Name == "tanf"   || Name == "tanl"  ||
-        Name == "asin"  || Name == "asinf"  || Name == "asinl" ||
-        Name == "acos"  || Name == "acosf"  || Name == "acosl" ||
-        Name == "atan"  || Name == "atanf"  || Name == "atanl" ||
-        Name == "atan2" || Name == "atan2f" || Name == "atan2l"||
-        Name == "sinh"  || Name == "sinhf"  || Name == "sinhl" ||
-        Name == "cosh"  || Name == "coshf"  || Name == "coshl" ||
-        Name == "tanh"  || Name == "tanhf"  || Name == "tanhl" ||
-        Name == "sqrt"  || Name == "sqrtf"  || Name == "sqrtl" ||
-        Name == "exp10"  || Name == "exp10l"  || Name == "exp10f")
+    if (Name == "copysign" || Name == "copysignf" || Name == "copysignl" || Name == "copysignf128" ||
+        Name == "fabs"  || Name == "fabsf"  || Name == "fabsl"  || Name  == "fabsf128" ||
+        Name == "fmin"  || Name == "fminf"  || Name == "fminl"  || Name  == "fminf128" ||
+        Name == "fmax"  || Name == "fmaxf"  || Name == "fmaxl"  || Name  == "fmaxf128" ||
+        Name == "sin"   || Name == "sinf"   || Name == "sinl"   || Name  == "sinf128"  ||
+        Name == "cos"   || Name == "cosf"   || Name == "cosl"   || Name  == "cosf128"  ||
+        Name == "tan"   || Name == "tanf"   || Name == "tanl"   || Name  == "tanf128"  ||
+        Name == "asin"  || Name == "asinf"  || Name == "asinl"  || Name  == "asinf128" ||
+        Name == "acos"  || Name == "acosf"  || Name == "acosl"  || Name  == "acosf128" ||
+        Name == "atan"  || Name == "atanf"  || Name == "atanl"  || Name  == "atanf128" ||
+        Name == "atan2" || Name == "atan2f" || Name == "atan2l" || Name  == "atan2f128"||
+        Name == "sinh"  || Name == "sinhf"  || Name == "sinhl"  || Name  == "sinhf128" ||
+        Name == "cosh"  || Name == "coshf"  || Name == "coshl"  || Name  == "coshf128" ||
+        Name == "tanh"  || Name == "tanhf"  || Name == "tanhl"  || Name  == "tanhf128" ||
+        Name == "sqrt"  || Name == "sqrtf"  || Name == "sqrtl"  || Name  == "sqrtf128" ||
+        Name == "exp10" || Name == "exp10l" || Name == "exp10f" || Name  == "exp10f128")
       return false;
     // clang-format on
     // These are all likely to be optimized into something smaller.
-    if (Name == "pow" || Name == "powf" || Name == "powl" || Name == "exp2" ||
-        Name == "exp2l" || Name == "exp2f" || Name == "floor" ||
+    if (Name == "pow" || Name == "powf" || Name == "powl" ||
+        Name == "powf128" || Name == "exp2" || Name == "exp2f" ||
+        Name == "exp2l" || Name == "exp2f128" || Name == "floor" ||
         Name == "floorf" || Name == "ceil" || Name == "round" ||
         Name == "ffs" || Name == "ffsl" || Name == "abs" || Name == "labs" ||
         Name == "llabs")
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.def b/llvm/include/llvm/IR/RuntimeLibcalls.def
index cd8e9b598044c..e5f9ee3b2f384 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.def
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.def
@@ -89,7 +89,8 @@ HANDLE_LIBCALL(CTPOP_I32, "__popcountsi2")
 HANDLE_LIBCALL(CTPOP_I64, "__popcountdi2")
 HANDLE_LIBCALL(CTPOP_I128, "__popcountti2")
 
-// Floating-point
+// Floating-point. Note that new fp128 math routines should also be added to
+// setF128LibcallFormat in RuntimeLibcalls.cpp.
 HANDLE_LIBCALL(ADD_F32, "__addsf3")
 HANDLE_LIBCALL(ADD_F64, "__adddf3")
 HANDLE_LIBCALL(ADD_F80, "__addxf3")
@@ -113,12 +114,12 @@ HANDLE_LIBCALL(DIV_PPCF128, "__gcc_qdiv")
 HANDLE_LIBCALL(REM_F32, "fmodf")
 HANDLE_LIBCALL(REM_F64, "fmod")
 HANDLE_LIBCALL(REM_F80, "fmodl")
-HANDLE_LIBCALL(REM_F128, "fmodl")
+HANDLE_LIBCALL(REM_F128, "fmodf128")
 HANDLE_LIBCALL(REM_PPCF128, "fmodl")
 HANDLE_LIBCALL(FMA_F32, "fmaf")
 HANDLE_LIBCALL(FMA_F64, "fma")
 HANDLE_LIBCALL(FMA_F80, "fmal")
-HANDLE_LIBCALL(FMA_F128, "fmal")
+HANDLE_LIBCALL(FMA_F128, "fmaf128")
 HANDLE_LIBCALL(FMA_PPCF128, "fmal")
 HANDLE_LIBCALL(POWI_F32, "__powisf2")
 HANDLE_LIBCALL(POWI_F64, "__powidf2")
@@ -128,117 +129,117 @@ HANDLE_LIBCALL(POWI_PPCF128, "__powitf2")
 HANDLE_LIBCALL(SQRT_F32, "sqrtf")
 HANDLE_LIBCALL(SQRT_F64, "sqrt")
 HANDLE_LIBCALL(SQRT_F80, "sqrtl")
-HANDLE_LIBCALL(SQRT_F128, "sqrtl")
+HANDLE_LIBCALL(SQRT_F128, "sqrtf128")
 HANDLE_LIBCALL(SQRT_PPCF128, "sqrtl")
 HANDLE_LIBCALL(CBRT_F32, "cbrtf")
 HANDLE_LIBCALL(CBRT_F64, "cbrt")
 HANDLE_LIBCALL(CBRT_F80, "cbrtl")
-HANDLE_LIBCALL(CBRT_F128, "cbrtl")
+HANDLE_LIBCALL(CBRT_F128, "cbrtf128")
 HANDLE_LIBCALL(CBRT_PPCF128, "cbrtl")
 HANDLE_LIBCALL(LOG_F32, "logf")
 HANDLE_LIBCALL(LOG_F64, "log")
 HANDLE_LIBCALL(LOG_F80, "logl")
-HANDLE_LIBCALL(LOG_F128, "logl")
+HANDLE_LIBCALL(LOG_F128, "logf128")
 HANDLE_LIBCALL(LOG_PPCF128, "logl")
 HANDLE_LIBCALL(LOG_FINITE_F32, "__logf_finite")
 HANDLE_LIBCALL(LOG_FINITE_F64, "__log_finite")
 HANDLE_LIBCALL(LOG_FINITE_F80, "__logl_finite")
-HANDLE_LIBCALL(LOG_FINITE_F128, "__logl_finite")
+HANDLE_LIBCALL(LOG_FINITE_F128, "__logf128_finite")
 HANDLE_LIBCALL(LOG_FINITE_PPCF128, "__logl_finite")
 HANDLE_LIBCALL(LOG2_F32, "log2f")
 HANDLE_LIBCALL(LOG2_F64, "log2")
 HANDLE_LIBCALL(LOG2_F80, "log2l")
-HANDLE_LIBCALL(LOG2_F128, "log2l")
+HANDLE_LIBCALL(LOG2_F128, "log2f128")
 HANDLE_LIBCALL(LOG2_PPCF128, "log2l")
 HANDLE_LIBCALL(LOG2_FINITE_F32, "__log2f_finite")
 HANDLE_LIBCALL(LOG2_FINITE_F64, "__log2_finite")
 HANDLE_LIBCALL(LOG2_FINITE_F80, "__log2l_finite")
-HANDLE_LIBCALL(LOG2_FINITE_F128, "__log2l_finite")
+HANDLE_LIBCALL(LOG2_FINITE_F128, "__log2f128_finite")
 HANDLE_LIBCALL(LOG2_FINITE_PPCF128, "__log2l_finite")
 HANDLE_LIBCALL(LOG10_F32, "log10f")
 HANDLE_LIBCALL(LOG10_F64, "log10")
 HANDLE_LIBCALL(LOG10_F80, "log10l")
-HANDLE_LIBCALL(LOG10_F128, "log10l")
+HANDLE_LIBCALL(LOG10_F128, "log10f128")
 HANDLE_LIBCALL(LOG10_PPCF128, "log10l")
 HANDLE_LIBCALL(LOG10_FINITE_F32, "__log10f_finite")
 HANDLE_LIBCALL(LOG10_FINITE_F64, "__log10_finite")
 HANDLE_LIBCALL(LOG10_FINITE_F80, "__log10l_finite")
-HANDLE_LIBCALL(LOG10_FINITE_F128, "__log10l_finite")
+HANDLE_LIBCALL(LOG10_FINITE_F128, "__log10f128_finite")
 HANDLE_LIBCALL(LOG10_FINITE_PPCF128, "__log10l_finite")
 HANDLE_LIBCALL(EXP_F32, "expf")
 HANDLE_LIBCALL(EXP_F64, "exp")
 HANDLE_LIBCALL(EXP_F80, "expl")
-HANDLE_LIBCALL(EXP_F128, "expl")
+HANDLE_LIBCALL(EXP_F128, "expf128")
 HANDLE_LIBCALL(EXP_PPCF128, "expl")
 HANDLE_LIBCALL(EXP_FINITE_F32, "__expf_finite")
 HANDLE_LIBCALL(EXP_FINITE_F64, "__exp_finite")
 HANDLE_LIBCALL(EXP_FINITE_F80, "__expl_finite")
-HANDLE_LIBCALL(EXP_FINITE_F128, "__expl_finite")
+HANDLE_LIBCALL(EXP_FINITE_F128, "__expf128_finite")
 HANDLE_LIBCALL(EXP_FINITE_PPCF128, "__expl_finite")
 HANDLE_LIBCALL(EXP2_F32, "exp2f")
 HANDLE_LIBCALL(EXP2_F64, "exp2")
 HANDLE_LIBCALL(EXP2_F80, "exp2l")
-HANDLE_LIBCALL(EXP2_F128, "exp2l")
+HANDLE_LIBCALL(EXP2_F128, "exp2f128")
 HANDLE_LIBCALL(EXP2_PPCF128, "exp2l")
 HANDLE_LIBCALL(EXP2_FINITE_F32, "__exp2f_finite")
 HANDLE_LIBCALL(EXP2_FINITE_F64, "__exp2_finite")
 HANDLE_LIBCALL(EXP2_FINITE_F80, "__exp2l_finite")
-HANDLE_LIBCALL(EXP2_FINITE_F128, "__exp2l_finite")
+HANDLE_LIBCALL(EXP2_FINITE_F128, "__exp2f128_finite")
 HANDLE_LIBCALL(EXP2_FINITE_PPCF128, "__exp2l_finite")
 HANDLE_LIBCALL(EXP10_F32, "exp10f")
 HANDLE_LIBCALL(EXP10_F64, "exp10")
 HANDLE_LIBCALL(EXP10_F80, "exp10l")
-HANDLE_LIBCALL(EXP10_F128, "exp10l")
+HANDLE_LIBCALL(EXP10_F128, "exp10f128")
 HANDLE_LIBCALL(EXP10_PPCF128, "exp10l")
 HANDLE_LIBCALL(SIN_F32, "sinf")
 HANDLE_LIBCALL(SIN_F64, "sin")
 HANDLE_LIBCALL(SIN_F80, "sinl")
-HANDLE_LIBCALL(SIN_F128, "sinl")
+HANDLE_LIBCALL(SIN_F128, "sinf128")
 HANDLE_LIBCALL(SIN_PPCF128, "sinl")
 HANDLE_LIBCALL(COS_F32, "cosf")
 HANDLE_LIBCALL(COS_F64, "cos")
 HANDLE_LIBCALL(COS_F80, "cosl")
-HANDLE_LIBCALL(COS_F128, "cosl")
+HANDLE_LIBCALL(COS_F128, "cosf128")
 HANDLE_LIBCALL(COS_PPCF128, "cosl")
 HANDLE_LIBCALL(TAN_F32, "tanf")
 HANDLE_LIBCALL(TAN_F64, "tan")
 HANDLE_LIBCALL(TAN_F80, "tanl")
-HANDLE_LIBCALL(TAN_F128,"tanl")
+HANDLE_LIBCALL(TAN_F128,"tanf128")
 HANDLE_LIBCALL(TAN_PPCF128, "tanl")
 HANDLE_LIBCALL(SINH_F32, "sinhf")
 HANDLE_LIBCALL(SINH_F64, "sinh")
 HANDLE_LIBCALL(SINH_F80, "sinhl")
-HANDLE_LIBCALL(SINH_F128, "sinhl")
+HANDLE_LIBCALL(SINH_F128, "sinhf128")
 HANDLE_LIBCALL(SINH_PPCF128, "sinhl")
 HANDLE_LIBCALL(COSH_F32, "coshf")
 HANDLE_LIBCALL(COSH_F64, "cosh")
 HANDLE_LIBCALL(COSH_F80, "coshl")
-HANDLE_LIBCALL(COSH_F128, "coshl")
+HANDLE_LIBCALL(COSH_F128, "coshf128")
 HANDLE_LIBCALL(COSH_PPCF128, "coshl")
 HANDLE_LIBCALL(TANH_F32, "tanhf")
 HANDLE_LIBCALL(TANH_F64, "tanh")
 HANDLE_LIBCALL(TANH_F80, "tanhl")
-HANDLE_LIBCALL(TANH_F128,"tanhl")
+HANDLE_LIBCALL(TANH_F128,"tanhf128")
 HANDLE_LIBCALL(TANH_PPCF128, "tanhl")
 HANDLE_LIBCALL(ASIN_F32, "asinf")
 HANDLE_LIBCALL(ASIN_F64, "asin")
 HANDLE_LIBCALL(ASIN_F80, "asinl")
-HANDLE_LIBCALL(ASIN_F128, "asinl")
+HANDLE_LIBCALL(ASIN_F128, "asinf128")
 HANDLE_LIBCALL(ASIN_PPCF128, "asinl")
 HANDLE_LIBCALL(ACOS_F32, "acosf")
 HANDLE_LIBCALL(ACOS_F64, "acos")
 HANDLE_LIBCALL(ACOS_F80, "acosl")
-HANDLE_LIBCALL(ACOS_F128, "acosl")
+HANDLE_LIBCALL(ACOS_F128, "acosf128")
 HANDLE_LIBCALL(ACOS_PPCF128, "acosl")
 HANDLE_LIBCALL(ATAN_F32, "atanf")
 HANDLE_LIBCALL(ATAN_F64, "atan")
 HANDLE_LIBCALL(ATAN_F80, "atanl")
-HANDLE_LIBCALL(ATAN_F128,"atanl")
+HANDLE_LIBCALL(ATAN_F128,"atanf128")
 HANDLE_LIBCALL(ATAN_PPCF128, "atanl")
 HANDLE_LIBCALL(ATAN2_F32, "atan2f")
 HANDLE_LIBCALL(ATAN2_F64, "atan2")
 HANDLE_LIBCALL(ATAN2_F80, "atan2l")
-HANDLE_LIBCALL(ATAN2_F128,"atan2l")
+HANDLE_LIBCALL(ATAN2_F128,"atan2f128")
 HANDLE_LIBCALL(ATAN2_PPCF128, "atan2l")
 HANDLE_LIBCALL(SINCOS_F32, nullptr)
 HANDLE_LIBCALL(SINCOS_F64, nullptr)
@@ -250,122 +251,122 @@ HANDLE_LIBCALL(SINCOS_STRET_F64, nullptr)
 HANDLE_LIBCALL(POW_F32, "powf")
 HANDLE_LIBCALL(POW_F64, "pow")
 HANDLE_LIBCALL(POW_F80, "powl")
-HANDLE_LIBCALL(POW_F128, "powl")
+HANDLE_LIBCALL(POW_F128, "powf128")
 HANDLE_LIBCALL(POW_PPCF128, "powl")
 HANDLE_LIBCALL(POW_FINITE_F32, "__powf_finite")
 HANDLE_LIBCALL(POW_FINITE_F64, "__pow_finite")
 HANDLE_LIBCALL(POW_FINITE_F80, "__powl_finite")
-HANDLE_LIBCALL(POW_FINITE_F128, "__powl_finite")
+HANDLE_LIBCALL(POW_FINITE_F128, "__powf128_finite")
 HANDLE_LIBCALL(POW_FINITE_PPCF128, "__powl_finite")
 HANDLE_LIBCALL(CEIL_F32, "ceilf")
 HANDLE_LIBCALL(CEIL_F64, "ceil")
 HANDLE_LIBCALL(CEIL_F80, "ceill")
-HANDLE_LIBCALL(CEIL_F128, "ceill")
+HANDLE_LIBCALL(CEIL_F128, "ceilf128")
 HANDLE_LIBCALL(CEIL_PPCF128, "ceill")
 HANDLE_LIBCALL(TRUNC_F32, "truncf")
 HANDLE_LIBCALL(TRUNC_F64, "trunc")
 HANDLE_LIBCALL(TRUNC_F80, "truncl")
-HANDLE_LIBCALL(TRUNC_F128, "truncl")
+HANDLE_LIBCALL(TRUNC_F128, "truncf128")
 HANDLE_LIBCALL(TRUNC_PPCF128, "truncl")
 HANDLE_LIBCALL(RINT_F32, "rintf")
 HANDLE_LIBCALL(RINT_F64, "rint")
 HANDLE_LIBCALL(RINT_F80, "rintl")
-HANDLE_LIBCALL(RINT_F128, "rintl")
+HANDLE_LIBCALL(RINT_F128, "rintf128")
 HANDLE_LIBCALL(RINT_PPCF128, "rintl")
 HANDLE_LIBCALL(NEARBYINT_F32, "nearbyintf")
 HANDLE_LIBCALL(NEARBYINT_F64, "nearbyint")
 HANDLE_LIBCALL(NEARBYINT_F80, "nearbyintl")
-HANDLE_LIBCALL(NEARBYINT_F128, "nearbyintl")
+HANDLE_LIBCALL(NEARBYINT_F128, "nearbyintf128")
 HANDLE_LIBCALL(NEARBYINT_PPCF128, "nearbyintl")
 HANDLE_LIBCALL(ROUND_F32, "roundf")
 HANDLE_LIBCALL(ROUND_F64, "round")
 HANDLE_LIBCALL(ROUND_F80, "roundl")
-HANDLE_LIBCALL(ROUND_F128, "roundl")
+HANDLE_LIBCALL(ROUND_F128, "roundf128")
 HANDLE_LIBCALL(ROUND_PPCF128, "roundl")
 HANDLE_LIBCALL(ROUNDEVEN_F32, "roundevenf")
 HANDLE_LIBCALL(ROUNDEVEN_F64, "roundeven")
 HANDLE_LIBCALL(ROUNDEVEN_F80, "roundevenl")
-HANDLE_LIBCALL(ROUNDEVEN_F128, "roundevenl")
+HANDLE_LIBCALL(ROUNDEVEN_F128, "roundevenf128")
 HANDLE_LIBCALL(ROUNDEVEN_PPCF128, "roundevenl")
 HANDLE_LIBCALL(FLOOR_F32, "floorf")
 HANDLE_LIBCALL(FLOOR_F64, "floor")
 HANDLE_LIBCALL(FLOOR_F80, "floorl")
-HANDLE_LIBCALL(FLOOR_F128, "floorl")
+HANDLE_LIBCALL(FLOOR_F128, "floorf128")
 HANDLE_LIBCALL(FLOOR_PPCF128, "floorl")
 HANDLE_LIBCALL(COPYSIGN_F32, "copysignf")
 HANDLE_LIBCALL(COPYSIGN_F64, "copysign")
 HANDLE_LIBCALL(COPYSIGN_F80, "copysignl")
-HANDLE_LIBCALL(COPYSIGN_F128, "copysignl")
+HANDLE_LIBCALL(COPYSIGN_F128, "copysignf128")
 HANDLE_LIBCALL(COPYSIGN_PPCF128, "copysignl")
 HANDLE_LIBCALL(FMIN_F32, "fminf")
 HANDLE_LIBCALL(FMIN_F64, "fmin")
 HANDLE_LIBCALL(FMIN_F80, "fminl")
-HANDLE_LIBCALL(FMIN_F128, "fminl")
+HANDLE_LIBCALL(FMIN_F128, "fminf128")
 HANDLE_LIBCALL(FMIN_PPCF128, "fminl")
 HANDLE_LIBCALL(FMAX_F32, "fmaxf")
 HANDLE_LIBCALL(FMAX_F64, "fmax")
 HANDLE_LIBCALL(FMAX_F80, "fmaxl")
-HANDLE_LIBCALL(FMAX_F128, "fmaxl")
+HANDLE_LIBCALL(FMAX_F128, "fmaxf128")
 HANDLE_LIBCALL(FMAX_PPCF128, "fmaxl")
 HANDLE_LIBCALL(FMINIMUM_F32, "fminimumf")
 HANDLE_LIBCALL(FMINIMUM_F64, "fminimum")
 HANDLE_LIBCALL(FMINIMUM_F80, "fminimuml")
-HANDLE_LIBCALL(FMINIMUM_F128, "fminimuml")
+HANDLE_LIBCALL(FMINIMUM_F128, "fminimumf128")
 HANDLE_LIBCALL(FMINIMUM_PPCF128, "fminimuml")
 HANDLE_LIBCALL(FMAXIMUM_F32, "fmaximumf")
 HANDLE_LIBCALL(FMAXIMUM_F64, "fmaximum")
 HANDLE_LIBCALL(FMAXIMUM_F80, "fmaximuml")
-HANDLE_LIBCALL(FMAXIMUM_F128, "fmaximuml")
+HANDLE_LIBCALL(FMAXIMUM_F128, "fmaximumf128")
 HANDLE_LIBCALL(FMAXIMUM_PPCF128, "fmaximum_numl")
 HANDLE_LIBCALL(FMINIMUMNUM_F32, "fminimum_numf")
 HANDLE_LIBCALL(FMINIMUMNUM_F64, "fminimum_num")
 HANDLE_LIBCALL(FMINIMUMNUM_F80, "fminimum_numl")
-HANDLE_LIBCALL(FMINIMUMNUM_F128, "fminimum_numl")
+HANDLE_LIBCALL(FMINIMUMNUM_F128, "fminimum_numf128")
 HANDLE_LIBCALL(FMINIMUMNUM_PPCF128, "fminimum_numl")
 HANDLE_LIBCALL(FMAXIMUMNUM_F32, "fmaximum_numf")
 HANDLE_LIBCALL(FMAXIMUMNUM_F64, "fmaximum_num")
 HANDLE_LIBCALL(FMAXIMUMNUM_F80, "fmaximum_numl")
-HANDLE_LIBCALL(FMAXIMUMNUM_F128, "fmaximum_numl")
+HANDLE_LIBCALL(FMAXIMUMNUM_F128, "fmaximum_numf128")
 HANDLE_LIBCALL(FMAXIMUMNUM_PPCF128, "fmaximum_numl")
 HANDLE_LIBCALL(LROUND_F32, "lroundf")
 HANDLE_LIBCALL(LROUND_F64, "lround")
 HANDLE_LIBCALL(LROUND_F80, "lroundl")
-HANDLE_LIBCALL(LROUND_F128, "lroundl")
+HANDLE_LIBCALL(LROUND_F128, "lroundf128")
 HANDLE_LIBCALL(LROUND_PPCF128, "lroundl")
 HANDLE_LIBCALL(LLROUND_F32, "llroundf")
 HANDLE_LIBCALL(LLROUND_F64, "llround")
 HANDLE_LIBCALL(LLROUND_F80, "llroundl")
-HANDLE_LIBCALL(LLROUND_F128, "llroundl")
+HANDLE_LIBCALL(LLROUND_F128, "llroundf128")
 HANDLE_LIBCALL(LLROUND_PPCF128, "llroundl")
 HANDLE_LIBCALL(LRINT_F32, "lrintf")
 HANDLE_LIBCALL(LRINT_F64, "lrint")
 HANDLE_LIBCALL(LRINT_F80, "lrintl")
-HANDLE_LIBCALL(LRINT_F128, "lrintl")
+HANDLE_LIBCALL(LRINT_F128, "lrintf128")
 HANDLE_LIBCALL(LRINT_PPCF128, "lrintl")
 HANDLE_LIBCALL(LLRINT_F32, "llrintf")
 HANDLE_LIBCALL(LLRINT_F64, "llrint")
 HANDLE_LIBCALL(LLRINT_F80, "llrintl")
-HANDLE_LIBCALL(LLRINT_F128, "llrintl")
+HANDLE_LIBCALL(LLRINT_F128, "llrintf128")
 HANDLE_LIBCALL(LLRINT_PPCF128, "llrintl")
 HANDLE_LIBCALL(LDEXP_F32, "ldexpf")
 HANDLE_LIBCALL(LDEXP_F64, "ldexp")
 HANDLE_LIBCALL(LDEXP_F80, "ldexpl")
-HANDLE_LIBCALL(LDEXP_F128, "ldexpl")
+HANDLE_LIBCALL(LDEXP_F128, "ldexpf128")
 HANDLE_LIBCALL(LDEXP_PPCF128, "ldexpl")
 HANDLE_LIBCALL(FREXP_F32, "frexpf")
 HANDLE_LIBCALL(FREXP_F64, "frexp")
 HANDLE_LIBCALL(FREXP_F80, "frexpl")
-HANDLE_LIBCALL(FREXP_F128, "frexpl")
+HANDLE_LIBCALL(FREXP_F128, "frexpf128")
 HANDLE_LIBCALL(FREXP_PPCF128, "frexpl")
 HANDLE_LIBCALL(SINCOSPI_F32, "sincospif")
 HANDLE_LIBCALL(SINCOSPI_F64, "sincospi")
 HANDLE_LIBCALL(SINCOSPI_F80, "sincospil")
-HANDLE_LIBCALL(SINCOSPI_F128, "sincospil")
+HANDLE_LIBCALL(SINCOSPI_F128, "sincospif128")
 HANDLE_LIBCALL(SINCOSPI_PPCF128, "sincospil")
 HANDLE_LIBCALL(MODF_F32, "modff")
 HANDLE_LIBCALL(MODF_F64, "modf")
 HANDLE_LIBCALL(MODF_F80, "modfl")
-HANDLE_LIBCALL(MODF_F128, "modfl")
+HANDLE_LIBCALL(MODF_F128, "modff128")
 HANDLE_LIBCALL(MODF_PPCF128, "modfl")
 
 // Floating point environment
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.h b/llvm/include/llvm/IR/RuntimeLibcalls.h
index b3648f5a31e2a..09da78720b988 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.h
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.h
@@ -20,6 +20,17 @@
 #include "llvm/TargetParser/Triple.h"
 
 namespace llvm {
+
+/// Library names to use for `fp128` libcalls.
+enum class F128LibcallFormat {
+  /// C23 `*f128` lowering, e.g. `sinf128`
+  Default = 0,
+  /// `long double` *l` lowering, e.g. `sinl`.
+  LongDouble = 1,
+  // If needed, this could be extended with an option for `q` suffixes from
+  // libquadmath.
+};
+
 namespace RTLIB {
 
 /// RTLIB::Libcall enum - This enum defines all of the runtime library calls
@@ -97,6 +108,13 @@ struct RuntimeLibcallsInfo {
   /// Set default libcall names. If a target wants to opt-out of a libcall it
   /// should be placed here.
   void initLibcalls(const Triple &TT);
+
+  /// Set a specific lowering convention for `fp128` math libcalls.
+  ///
+  /// By default, `fp128` math functions get lowered to the C23 `sinf128`-
+  /// style symbols. This allows overriding with `sinl`-style symbols on
+  /// platforms where `long double` is known to be identical to _Float128.
+  void setF128LibcallFormat(F128LibcallFormat Format);
 };
 
 } // namespace RTLIB
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index fb6bbc0163701..f3976704f4c7c 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -262,13 +262,13 @@ class Triple {
     EABIHF,
     Android,
     Musl,
-    MuslABIN32,
-    MuslABI64,
-    MuslEABI,
-    MuslEABIHF,
-    MuslF32,
-    MuslSF,
-    MuslX32,
+    MuslABIN32, // MIPS N32 ABI
+    MuslABI64,  // MIPS N64 ABI
+    MuslEABI,   // Arm32 EABI
+    MuslEABIHF, // Arm32 EABI + HF
+    MuslF32,    // LoongArch ILP32F/LP64F
+    MuslSF,     // LoongArch ILP32S/LP64S
+    MuslX32,    // Musl using 32-bit ABI on x86_64
     LLVM,
 
     MSVC,
@@ -1231,6 +1231,12 @@ class Triple {
   /// or an invalid version tuple if this triple doesn't have one.
   VersionTuple getMinimumSupportedOSVersion() const;
 
+  /// Check whether (1) f128 is the same format as `long double`, and (2)
+  /// `*f128` symbols are likely unavailable. In other words, platforms for
+  /// which this returns true may safely use sqrtl instead of sqrtf128 and
+  /// should do so because sqrtf128 would probably error at link time.
+  bool shouldLowerf128AsLongDouble() const;
+
   /// @}
   /// @name Static helpers for IDs.
   /// @{
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 90c3bf0db0236..e00f4346984ae 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -25,54 +25,6 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
   for (int LC = 0; LC < RTLIB::UNKNOWN_LIBCALL; ++LC)
     setLibcallCallingConv((RTLIB::Libcall)LC, CallingConv::C);
 
-  // Use the f128 variants of math functions on 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");
-    setLibcallName(RTLIB::CBRT_F128, "cbrtf128");
-    setLibcallName(RTLIB::LOG_F128, "logf128");
-    setLibcallName(RTLIB::LOG_FINITE_F128, "__logf128_finite");
-    setLibcallName(RTLIB::LOG2_F128, "log2f128");
-    setLibcallName(RTLIB::LOG2_FINITE_F128, "__log2f128_finite");
-    setLibcallName(RTLIB::LOG10_F128, "log10f128");
-    setLibcallName(RTLIB::LOG10_FINITE_F128, "__log10f128_finite");
-    setLibcallName(RTLIB::EXP_F128, "expf128");
-    setLibcallName(RTLIB::EXP_FINITE_F128, "__expf128_finite");
-    setLibcallName(RTLIB::EXP2_F128, "exp2f128");
-    setLibcallName(RTLIB::EXP2_FINITE_F128, "__exp2f128_finite");
-    setLibcallName(RTLIB::EXP10_F128, "exp10f128");
-    setLibcallName(RTLIB::SIN_F128, "sinf128");
-    setLibcallName(RTLIB::COS_F128, "cosf128");
-    setLibcallName(RTLIB::TAN_F128, "tanf128");
-    setLibcallName(RTLIB::SINCOS_F128, "sincosf128");
-    setLibcallName(RTLIB::ASIN_F128, "asinf128");
-    setLibcallName(RTLIB::ACOS_F128, "acosf128");
-    setLibcallName(RTLIB::ATAN_F128, "atanf128");
-    setLibcallName(RTLIB::ATAN2_F128, "atan2f128");
-    setLibcallName(RTLIB::SINH_F128, "sinhf128");
-    setLibcallName(RTLIB::COSH_F128, "coshf128");
-    setLibcallName(RTLIB::TANH_F128, "tanhf128");
-    setLibcallName(RTLIB::POW_F128, "powf128");
-    setLibcallName(RTLIB::POW_FINITE_F128, "__powf128_finite");
-    setLibcallName(RTLIB::CEIL_F128, "ceilf128");
-    setLibcallName(RTLIB::TRUNC_F128, "truncf128");
-    setLibcallName(RTLIB::RINT_F128, "rintf128");
-    setLibcallName(RTLIB::NEARBYINT_F128, "nearbyintf128");
-    setLibcallName(RTLIB::ROUND_F128, "roundf128");
-    setLibcallName(RTLIB::ROUNDEVEN_F128, "roundevenf128");
-    setLibcallName(RTLIB::FLOOR_F128, "floorf128");
-    setLibcallName(RTLIB::COPYSIGN_F128, "copysignf128");
-    setLibcallName(RTLIB::FMIN_F128, "fminf128");
-    setLibcallName(RTLIB::FMAX_F128, "fmaxf128");
-    setLibcallName(RTLIB::LROUND_F128, "lroundf128");
-    setLibcallName(RTLIB::LLROUND_F128, "llroundf128");
-    setLibcallName(RTLIB::LRINT_F128, "lrintf128");
-    setLibcallName(RTLIB::LLRINT_F128, "llrintf128");
-    setLibcallName(RTLIB::LDEXP_F128, "ldexpf128");
-    setLibcallName(RTLIB::FREXP_F128, "frexpf128");
-  }
-
   // For IEEE quad-precision libcall names, PPC uses "kf" instead of "tf".
   if (TT.isPPC()) {
     setLibcallName(RTLIB::ADD_F128, "__addkf3");
@@ -178,7 +130,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
     setLibcallName(RTLIB::SINCOS_F32, "sincosf");
     setLibcallName(RTLIB::SINCOS_F64, "sincos");
     setLibcallName(RTLIB::SINCOS_F80, "sincosl");
-    setLibcallName(RTLIB::SINCOS_F128, "sincosl");
+    setLibcallName(RTLIB::SINCOS_F128, "sincosf128");
     setLibcallName(RTLIB::SINCOS_PPCF128, "sincosl");
   }
 
@@ -253,4 +205,68 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
     }
     setLibcallName(RTLIB::MULO_I128, nullptr);
   }
+
+  // By default fp128 libcalls get lowered to `*f128` symbols, which is
+  // safest because the symbols are only ever for binary128 on all platforms.
+  // Unfortunately many platforms only have the `*l` (`long double`) symbols,
+  // which vary by architecture and compilation flags, so we have to use them
+  // sometimes.
+  if (TT.shouldLowerf128AsLongDouble())
+    setF128LibcallFormat(F128LibcallFormat::LongDouble);
+}
+
+void RuntimeLibcallsInfo::setF128LibcallFormat(F128LibcallFormat Format) {
+  bool UseLD = Format == F128LibcallFormat::LongDouble;
+
+  setLibcallName(RTLIB::ACOS_F128, UseLD ? "acosl" : "acosf128");
+  setLibcallName(RTLIB::ASIN_F128, UseLD ? "asinl" : "asinf128");
+  setLibcallName(RTLIB::ATAN2_F128, UseLD ? "atan2l" : "atan2f128");
+  setLibcallName(RTLIB::ATAN_F128, UseLD ? "atanl" : "atanf128");
+  setLibcallName(RTLIB::CBRT_F128, UseLD ? "cbrtl" : "cbrtf128");
+  setLibcallName(RTLIB::CEIL_F128, UseLD ? "ceill" : "ceilf128");
+  setLibcallName(RTLIB::COPYSIGN_F128, UseLD ? "copysignl" : "copysignf128");
+  setLibcallName(RTLIB::COSH_F128, UseLD ? "coshl" : "coshf128");
+  setLibcallName(RTLIB::COS_F128, UseLD ? "cosl" : "cosf128");
+  setLibcallName(RTLIB::EXP10_F128, UseLD ? "exp10l" : "exp10f128");
+  setLibcallName(RTLIB::EXP2_F128, UseLD ? "exp2l" : "exp2f128");
+  setLibcallName(RTLIB::EXP_F128, UseLD ? "expl" : "expf128");
+  setLibcallName(RTLIB::FLOOR_F128, UseLD ? "floorl" : "floorf128");
+  setLibcallName(RTLIB::FMAXIMUMNUM_F128,
+                 UseLD ? "fmaximum_numl" : "fmaximum_numf128");
+  setLibcallName(RTLIB::FMAXIMUM_F128, UseLD ? "fmaximuml" : "fmaximumf128");
+  setLibcallName(RTLIB::FMAX_F128, UseLD ? "fmaxl" : "fmaxf128");
+  setLibcallName(RTLIB::FMA_F128, UseLD ? "fmal" : "fmaf128");
+  setLibcallName(RTLIB::FMINIMUMNUM_F128,
+                 UseLD ? "fminimum_numl" : "fminimum_numf128");
+  setLibcallName(RTLIB::FMINIMUM_F128, UseLD ? "fminimuml" : "fminimumf128");
+  setLibcallName(RTLIB::FMIN_F128, UseLD ? "fminl" : "fminf128");
+  setLibcallName(RTLIB::FREXP_F128, UseLD ? "frexpl" : "frexpf128");
+  setLibcallName(RTLIB::LDEXP_F128, UseLD ? "ldexpl" : "ldexpf128");
+  setLibcallName(RTLIB::LLRINT_F128, UseLD ? "llrintl" : "llrintf128");
+  setLibcallName(RTLIB::LLROUND_F128, UseLD ? "llroundl" : "llroundf128");
+  setLibcallName(RTLIB::LOG10_F128, UseLD ? "log10l" : "log10f128");
+  setLibcallName(RTLIB::LOG2_F128, UseLD ? "log2l" : "log2f128");
+  setLibcallName(RTLIB::LOG_F128, UseLD ? "logl" : "logf128");
+  setLibcallName(RTLIB::LRINT_F128, UseLD ? "lrintl" : "lrintf128");
+  setLibcallName(RTLIB::LROUND_F128, UseLD ? "lroundl" : "lroundf128");
+  setLibcallName(RTLIB::MODF_F128, UseLD ? "modfl" : "modff128");
+  setLibcallName(RTLIB::NEARBYINT_F128, UseLD ? "nearbyintl" : "nearbyintf128");
+  setLibcallName(RTLIB::POW_F128, UseLD ? "powl" : "powf128");
+  setLibcallName(RTLIB::REM_F128, UseLD ? "fmodl" : "fmodf128");
+  setLibcallName(RTLIB::RINT_F128, UseLD ? "rintl" : "rintf128");
+  setLibcallName(RTLIB::ROUNDEVEN_F128, UseLD ? "roundevenl" : "roundevenf128");
+  setLibcallName(RTLIB::ROUND_F128, UseLD ? "roundl" : "roundf128");
+  setLibcallName(RTLIB::SINCOSPI_F128, UseLD ? "sincospil" : "sincospif128");
+  setLibcallName(RTLIB::SINH_F128, UseLD ? "sinhl" : "sinhf128");
+  setLibcallName(RTLIB::SIN_F128, UseLD ? "sinl" : "sinf128");
+  setLibcallName(RTLIB::SQRT_F128, UseLD ? "sqrtl" : "sqrtf128");
+  setLibcallName(RTLIB::TANH_F128, UseLD ? "tanhl" : "tanhf128");
+  setLibcallName(RTLIB::TAN_F128, UseLD ? "tanl" : "tanf128");
+  setLibcallName(RTLIB::TRUNC_F128, UseLD ? "truncl" : "truncf128");
+
+  if (nullptr != getLibcallName(RTLIB::SINCOS_F128)) {
+    // Upsate sincos only if already set (sincos is allowed to be null to use
+    // sin+cos instead).
+    setLibcallName(RTLIB::SINCOS_F128, UseLD ? "sincosl" : "sincosf128");
+  }
 }
diff --git a/llvm/lib/Target/Mips/MipsCCState.cpp b/llvm/lib/Target/Mips/MipsCCState.cpp
index 9e8cd2ea2fd43..9111d142cea39 100644
--- a/llvm/lib/Target/Mips/MipsCCState.cpp
+++ b/llvm/lib/Target/Mips/MipsCCState.cpp
@@ -21,11 +21,16 @@ bool MipsCCState::isF128SoftLibCall(const char *CallSym) {
       "__floatuntitf", "__getf2",      "__gttf2",       "__letf2",
       "__lttf2",       "__multf3",     "__netf2",       "__powitf2",
       "__subtf3",      "__trunctfdf2", "__trunctfsf2",  "__unordtf2",
-      "ceill",         "copysignl",    "cosl",          "exp2l",
-      "expl",          "floorl",       "fmal",          "fmaxl",
-      "fmodl",         "log10l",       "log2l",         "logl",
-      "nearbyintl",    "powl",         "rintl",         "roundl",
-      "sinl",          "sqrtl",        "truncl"};
+      "ceilf128",      "ceill",        "copysignf128",  "copysignl",
+      "cosf128",       "cosl",         "exp2f128",      "exp2l",
+      "expf128",       "expl",         "floorf128",     "floorl",
+      "fmaf128",       "fmal",         "fmaxf128",      "fmaxl",
+      "fmodf128",      "fmodl",        "log10f128",     "log10l",
+      "log2f128",      "log2l",        "logf128",       "logl",
+      "nearbyintf128", "nearbyintl",   "powf128",       "powl",
+      "rintf128",      "rintl",        "roundf128",     "roundl",
+      "sinf128",       "sinl",         "sqrtf128",      "sqrtl",
+      "truncf128",     "truncl"};
 
   // Check that LibCalls is sorted alphabetically.
   auto Comp = [](const char *S1, const char *S2) { return strcmp(S1, S2) < 0; };
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 0800ed5dfce2c..221d775b97e50 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1425,32 +1425,6 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     setTargetDAGCombine({ISD::TRUNCATE, ISD::SETCC, ISD::SELECT_CC});
   }
 
-  setLibcallName(RTLIB::LOG_F128, "logf128");
-  setLibcallName(RTLIB::LOG2_F128, "log2f128");
-  setLibcallName(RTLIB::LOG10_F128, "log10f128");
-  setLibcallName(RTLIB::EXP_F128, "expf128");
-  setLibcallName(RTLIB::EXP2_F128, "exp2f128");
-  setLibcallName(RTLIB::SIN_F128, "sinf128");
-  setLibcallName(RTLIB::COS_F128, "cosf128");
-  setLibcallName(RTLIB::SINCOS_F128, "sincosf128");
-  setLibcallName(RTLIB::POW_F128, "powf128");
-  setLibcallName(RTLIB::FMIN_F128, "fminf128");
-  setLibcallName(RTLIB::FMAX_F128, "fmaxf128");
-  setLibcallName(RTLIB::REM_F128, "fmodf128");
-  setLibcallName(RTLIB::SQRT_F128, "sqrtf128");
-  setLibcallName(RTLIB::CEIL_F128, "ceilf128");
-  setLibcallName(RTLIB::FLOOR_F128, "floorf128");
-  setLibcallName(RTLIB::TRUNC_F128, "truncf128");
-  setLibcallName(RTLIB::ROUND_F128, "roundf128");
-  setLibcallName(RTLIB::LROUND_F128, "lroundf128");
-  setLibcallName(RTLIB::LLROUND_F128, "llroundf128");
-  setLibcallName(RTLIB::RINT_F128, "rintf128");
-  setLibcallName(RTLIB::LRINT_F128, "lrintf128");
-  setLibcallName(RTLIB::LLRINT_F128, "llrintf128");
-  setLibcallName(RTLIB::NEARBYINT_F128, "nearbyintf128");
-  setLibcallName(RTLIB::FMA_F128, "fmaf128");
-  setLibcallName(RTLIB::FREXP_F128, "frexpf128");
-
   if (Subtarget.isAIXABI()) {
     setLibcallName(RTLIB::MEMCPY, isPPC64 ? "___memmove64" : "___memmove");
     setLibcallName(RTLIB::MEMMOVE, isPPC64 ? "___memmove64" : "___memmove");
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
index ce795d3dedc6a..e9a66e071b00a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
@@ -544,6 +544,53 @@ struct StaticLibcallNameMap {
       }
     }
 
+    // Libcalls from the .def file use `*f128` symbols by default, but for
+    // Wasm wind up fixed up to `*l` versions. Add these to the map so we can
+    // work with either (`long double` is f128 on wasm).
+    Map["acosl"] = RTLIB::ACOS_F128;
+    Map["asinl"] = RTLIB::ASIN_F128;
+    Map["atan2l"] = RTLIB::ATAN2_F128;
+    Map["atanl"] = RTLIB::ATAN_F128;
+    Map["cbrtl"] = RTLIB::CBRT_F128;
+    Map["ceill"] = RTLIB::CEIL_F128;
+    Map["copysignl"] = RTLIB::COPYSIGN_F128;
+    Map["coshl"] = RTLIB::COSH_F128;
+    Map["cosl"] = RTLIB::COS_F128;
+    Map["exp10l"] = RTLIB::EXP10_F128;
+    Map["exp2l"] = RTLIB::EXP2_F128;
+    Map["expl"] = RTLIB::EXP_F128;
+    Map["floorl"] = RTLIB::FLOOR_F128;
+    Map["fmal"] = RTLIB::FMA_F128;
+    Map["fmaximum_numl"] = RTLIB::FMAXIMUMNUM_F128;
+    Map["fmaximuml"] = RTLIB::FMAXIMUM_F128;
+    Map["fmaxl"] = RTLIB::FMAX_F128;
+    Map["fminimum_numl"] = RTLIB::FMINIMUMNUM_F128;
+    Map["fminimuml"] = RTLIB::FMINIMUM_F128;
+    Map["fminl"] = RTLIB::FMIN_F128;
+    Map["fmodl"] = RTLIB::REM_F128;
+    Map["frexpl"] = RTLIB::FREXP_F128;
+    Map["ldexpl"] = RTLIB::LDEXP_F128;
+    Map["llrintl"] = RTLIB::LLRINT_F128;
+    Map["llroundl"] = RTLIB::LLROUND_F128;
+    Map["log10l"] = RTLIB::LOG10_F128;
+    Map["log2l"] = RTLIB::LOG2_F128;
+    Map["logl"] = RTLIB::LOG_F128;
+    Map["lrintl"] = RTLIB::LRINT_F128;
+    Map["lroundl"] = RTLIB::LROUND_F128;
+    Map["modfl"] = RTLIB::MODF_F128;
+    Map["nearbyintl"] = RTLIB::NEARBYINT_F128;
+    Map["powl"] = RTLIB::POW_F128;
+    Map["rintl"] = RTLIB::RINT_F128;
+    Map["roundevenl"] = RTLIB::ROUNDEVEN_F128;
+    Map["roundl"] = RTLIB::ROUND_F128;
+    Map["sincospil"] = RTLIB::SINCOSPI_F128;
+    Map["sinhl"] = RTLIB::SINH_F128;
+    Map["sinl"] = RTLIB::SIN_F128;
+    Map["sqrtl"] = RTLIB::SQRT_F128;
+    Map["tanhl"] = RTLIB::TANH_F128;
+    Map["tanl"] = RTLIB::TAN_F128;
+    Map["truncl"] = RTLIB::TRUNC_F128;
+
     Map["emscripten_return_address"] = RTLIB::RETURN_ADDRESS;
   }
 };
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 74363f8d71b65..8b9a96f5682d1 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -2165,6 +2165,43 @@ VersionTuple Triple::getCanonicalVersionForOS(OSType OSKind,
   }
 }
 
+bool Triple::shouldLowerf128AsLongDouble() const {
+  // Always prefer to lower to `*f128` symbols when they are likely to be
+  // available, to avoid any inaccuracies or problems from libc config.
+  //
+  // Note that the logic should be kept in sync with Clang's LongDoubleFormat.
+
+  // Glibc helpfully aliases `*f128` symbols to `*l` symbols on platforms where
+  // that works, so use those.
+  if (isGNUEnvironment())
+    return false;
+
+  // Windows and Apple always use f64 as `long double`.
+  if (isOSWindows() || isOSDarwin())
+    return false;
+
+  // Most 64-bit architectures use use binary128, a few are binary128 on both
+  // 64- and 32-bit.
+  if (isAArch64() || isLoongArch() || isRISCV() || isSPARC() || isSystemZ() ||
+      isVE() || isWasm())
+    return true;
+
+  // MIPS64 is usually f128, except on FreeBSD-like operating systems. MIPS32
+  // is f128 with N32 but f64 with the O32 ABI. Triple doesn't know about ABI
+  // here, so allow MIPS32 to hit the safer `ld !== f128` default.
+  if (isMIPS64() && !(isOSFreeBSD() || isOSKFreeBSD() || isOSDragonFly()))
+    return true;
+
+  // Android and Ohos use binary128 on x86_64.
+  if (getArch() == Triple::x86_64 && (isAndroid() || isOHOSFamily()))
+    return true;
+
+  // By default, make the safe assumption that `long double !== f128`. This
+  // also catches x86 (`long double` is x87 `f80`) and PowerPC (`long double`
+  // is `f64` or PPC double-double).
+  return false;
+}
+
 // HLSL triple environment orders are relied on in the front end
 static_assert(Triple::Vertex - Triple::Pixel == 1,
               "incorrect HLSL stage order");
diff --git a/llvm/test/CodeGen/Generic/f128-math-lowering.ll b/llvm/test/CodeGen/Generic/f128-math-lowering.ll
index 51142eb4254b7..01173272f7b22 100644
--- a/llvm/test/CodeGen/Generic/f128-math-lowering.ll
+++ b/llvm/test/CodeGen/Generic/f128-math-lowering.ll
@@ -1,13 +1,13 @@
 ; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-none -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
-; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
 ; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-musl -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
-; RUN: %if arm-registered-target %{ llc < %s -mtriple=arm-none-eabi -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
-; RUN: %if xfail-powerpc-registered-target %{ llc < %s -mtriple=powerpc-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
-; RUN: %if xfail-powerpc-registered-target %{ llc < %s -mtriple=powerpc64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if arm-registered-target %{ llc < %s -mtriple=arm-none-eabi -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if powerpc-registered-target %{ llc < %s -mtriple=powerpc-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if powerpc-registered-target %{ llc < %s -mtriple=powerpc64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
 ; RUN: %if riscv-registered-target %{ llc < %s -mtriple=riscv32-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
 ; RUN: %if systemz-registered-target %{ llc < %s -mtriple=s390x-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-S390X %}
-; RUN: %if x86-registered-target %{ llc < %s -mtriple=i686-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
-; RUN: %if x86-registered-target %{ llc < %s -mtriple=x86_64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-USELD %}
+; RUN: %if x86-registered-target %{ llc < %s -mtriple=i686-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
+; RUN: %if x86-registered-target %{ llc < %s -mtriple=x86_64-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,CHECK-F128 %}
 ;
 ; Verify that fp128 intrinsics only lower to `long double` calls (e.g. sinl) on
 ; platforms where 128 and `long double` have the same layout, and where the
@@ -22,9 +22,6 @@
 ; * gnu (has f128 symbols on all platforms so we can use those)
 ; * musl (no f128 symbols available)
 
-; FIXME: targets are configured so these tests pass, but the output has not
-; yet been corrected.
-
 define fp128 @test_acos(fp128 %a) {
 ; CHECK-LABEL:      test_acos:
 ; CHECK-F128:       acosf128

>From b14297df673bef26f2c7922bb389a94f685ffdec Mon Sep 17 00:00:00 2001
From: Trevor Gross <tmgross at umich.edu>
Date: Sun, 27 Apr 2025 09:49:54 +0000
Subject: [PATCH 3/3] Update tests

---
 .../WebAssemblyRuntimeLibcallSignatures.cpp   |   1 +
 .../test/CodeGen/AArch64/illegal-float-ops.ll |  58 ++++--
 llvm/test/CodeGen/AArch64/sincos-expansion.ll |   2 +-
 .../vecreduce-fmax-legalization-nan.ll        |   2 +-
 llvm/test/CodeGen/ARM/ldexp.ll                |   2 +-
 llvm/test/CodeGen/ARM/llvm.sincos.ll          |   2 +-
 llvm/test/CodeGen/Mips/cconv/fmaxl_call.ll    |   2 +-
 llvm/test/CodeGen/Mips/cconv/roundl-call.ll   |   2 +-
 llvm/test/CodeGen/Mips/llrint-conv.ll         |   4 +-
 llvm/test/CodeGen/Mips/llround-conv.ll        |   4 +-
 llvm/test/CodeGen/Mips/lrint-conv.ll          |   4 +-
 llvm/test/CodeGen/Mips/lround-conv.ll         |   4 +-
 llvm/test/CodeGen/PowerPC/f128-arith.ll       |  56 ++---
 .../test/CodeGen/SystemZ/atomicrmw-fmax-03.ll |   2 +-
 .../test/CodeGen/SystemZ/atomicrmw-fmin-03.ll |   2 +-
 llvm/test/CodeGen/SystemZ/fp-libcall.ll       |  20 +-
 llvm/test/CodeGen/SystemZ/fp-mul-13.ll        |   2 +-
 llvm/test/CodeGen/SystemZ/fp-round-01.ll      |  12 +-
 llvm/test/CodeGen/SystemZ/fp-sincos-01.ll     |   2 +-
 llvm/test/CodeGen/SystemZ/fp-strict-mul-13.ll |   2 +-
 .../CodeGen/SystemZ/fp-strict-round-01.ll     |  12 +-
 .../test/CodeGen/X86/fp128-libcalls-strict.ll | 192 +++++++++---------
 llvm/test/CodeGen/X86/fp128-libcalls.ll       | 120 +++++------
 23 files changed, 268 insertions(+), 241 deletions(-)

diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
index e9a66e071b00a..7d98b1e81d806 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
@@ -535,6 +535,7 @@ struct StaticLibcallNameMap {
 #undef HANDLE_LIBCALL
     };
     for (const auto &NameLibcall : NameLibcalls) {
+      fprintf(stderr, "libcall: %s", NameLibcall.first);
       if (NameLibcall.first != nullptr &&
           getRuntimeLibcallSignatures().Table[NameLibcall.second] !=
               unsupported) {
diff --git a/llvm/test/CodeGen/AArch64/illegal-float-ops.ll b/llvm/test/CodeGen/AArch64/illegal-float-ops.ll
index 5ec66b784c037..9f0b7ed74e1c5 100644
--- a/llvm/test/CodeGen/AArch64/illegal-float-ops.ll
+++ b/llvm/test/CodeGen/AArch64/illegal-float-ops.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s
-; RUN: llc -mtriple=aarch64-linux-android -verify-machineinstrs -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-GNU
+; RUN: llc -mtriple=aarch64-linux-android -verify-machineinstrs -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-ANDROID
 
 @varfloat = global float 0.0
 @vardouble = global double 0.0
@@ -22,7 +22,8 @@ define void @test_cos(float %float, double %double, fp128 %fp128) {
 
    %cosfp128 = call fp128 @llvm.cos.f128(fp128 %fp128)
    store fp128 %cosfp128, ptr @varfp128
-; CHECK: bl cosl
+; CHECK-GNU: bl cosf128
+; CHECK-ANDROID: bl cosl
 
   ret void
 }
@@ -44,7 +45,8 @@ define void @test_exp(float %float, double %double, fp128 %fp128) {
 
    %expfp128 = call fp128 @llvm.exp.f128(fp128 %fp128)
    store fp128 %expfp128, ptr @varfp128
-; CHECK: bl expl
+; CHECK-GNU: bl expf128
+; CHECK-ANDROID: bl expl
 
   ret void
 }
@@ -66,7 +68,8 @@ define void @test_exp2(float %float, double %double, fp128 %fp128) {
 
    %exp2fp128 = call fp128 @llvm.exp2.f128(fp128 %fp128)
    store fp128 %exp2fp128, ptr @varfp128
-; CHECK: bl exp2l
+; CHECK-GNU: bl exp2f128
+; CHECK-ANDROID: bl exp2l
   ret void
 
 }
@@ -88,7 +91,8 @@ define void @test_log(float %float, double %double, fp128 %fp128) {
 
    %logfp128 = call fp128 @llvm.log.f128(fp128 %fp128)
    store fp128 %logfp128, ptr @varfp128
-; CHECK: bl logl
+; CHECK-GNU: bl logf128
+; CHECK-ANDROID: bl logl
 
   ret void
 }
@@ -110,7 +114,8 @@ define void @test_log2(float %float, double %double, fp128 %fp128) {
 
    %log2fp128 = call fp128 @llvm.log2.f128(fp128 %fp128)
    store fp128 %log2fp128, ptr @varfp128
-; CHECK: bl log2l
+; CHECK-GNU: bl log2f128
+; CHECK-ANDROID: bl log2l
   ret void
 
 }
@@ -132,7 +137,8 @@ define void @test_log10(float %float, double %double, fp128 %fp128) {
 
    %log10fp128 = call fp128 @llvm.log10.f128(fp128 %fp128)
    store fp128 %log10fp128, ptr @varfp128
-; CHECK: bl log10l
+; CHECK-GNU: bl log10f128
+; CHECK-ANDROID: bl log10l
 
   ret void
 }
@@ -154,7 +160,8 @@ define void @test_sin(float %float, double %double, fp128 %fp128) {
 
    %sinfp128 = call fp128 @llvm.sin.f128(fp128 %fp128)
    store fp128 %sinfp128, ptr @varfp128
-; CHECK: bl sinl
+; CHECK-GNU: bl sinf128
+; CHECK-ANDROID: bl sinl
   ret void
 
 }
@@ -176,7 +183,8 @@ define void @test_tan(float %float, double %double, fp128 %fp128) {
 
    %tanfp128 = call fp128 @llvm.tan.f128(fp128 %fp128)
    store fp128 %tanfp128, ptr @varfp128
-; CHECK: bl tanl
+; CHECK-GNU: bl tanf128
+; CHECK-ANDROID: bl tanl
   ret void
 }
 
@@ -197,7 +205,8 @@ define void @test_acos(float %float, double %double, fp128 %fp128) {
 
    %acosfp128 = call fp128 @llvm.acos.f128(fp128 %fp128)
    store fp128 %acosfp128, ptr @varfp128
-; CHECK: bl acosl
+; CHECK-GNU: bl acosf128
+; CHECK-ANDROID: bl acosl
   ret void
 }
 
@@ -218,7 +227,8 @@ define void @test_asin(float %float, double %double, fp128 %fp128) {
 
    %asinfp128 = call fp128 @llvm.asin.f128(fp128 %fp128)
    store fp128 %asinfp128, ptr @varfp128
-; CHECK: bl asinl
+; CHECK-GNU: bl asinf128
+; CHECK-ANDROID: bl asinl
   ret void
 }
 
@@ -239,7 +249,8 @@ define void @test_atan(float %float, double %double, fp128 %fp128) {
 
    %atanfp128 = call fp128 @llvm.atan.f128(fp128 %fp128)
    store fp128 %atanfp128, ptr @varfp128
-; CHECK: bl atanl
+; CHECK-GNU: bl atanf128
+; CHECK-ANDROID: bl atanl
   ret void
 }
 
@@ -260,7 +271,8 @@ define void @test_atan2(float %float1, double %double1, fp128 %fp1281, float %fl
 
    %atan2fp128 = call fp128 @llvm.atan2.f128(fp128 %fp1281, fp128 %fp1282)
    store fp128 %atan2fp128, ptr @varfp128
-; CHECK: bl atan2l
+; CHECK-GNU: bl atan2f128
+; CHECK-ANDROID: bl atan2l
   ret void
 }
 
@@ -281,7 +293,8 @@ define void @test_cosh(float %float, double %double, fp128 %fp128) {
 
    %coshfp128 = call fp128 @llvm.cosh.f128(fp128 %fp128)
    store fp128 %coshfp128, ptr @varfp128
-; CHECK: bl coshl
+; CHECK-GNU: bl coshf128
+; CHECK-ANDROID: bl coshl
   ret void
 }
 
@@ -302,7 +315,8 @@ define void @test_sinh(float %float, double %double, fp128 %fp128) {
 
    %sinhfp128 = call fp128 @llvm.sinh.f128(fp128 %fp128)
    store fp128 %sinhfp128, ptr @varfp128
-; CHECK: bl sinhl
+; CHECK-GNU: bl sinhf128
+; CHECK-ANDROID: bl sinhl
   ret void
 }
 
@@ -323,7 +337,8 @@ define void @test_tanh(float %float, double %double, fp128 %fp128) {
 
    %tanhfp128 = call fp128 @llvm.tanh.f128(fp128 %fp128)
    store fp128 %tanhfp128, ptr @varfp128
-; CHECK: bl tanhl
+; CHECK-GNU: bl tanhf128
+; CHECK-ANDROID: bl tanhl
   ret void
 }
 
@@ -344,7 +359,8 @@ define void @test_pow(float %float, double %double, fp128 %fp128) {
 
    %powfp128 = call fp128 @llvm.pow.f128(fp128 %fp128, fp128 %fp128)
    store fp128 %powfp128, ptr @varfp128
-; CHECK: bl powl
+; CHECK-GNU: bl powf128
+; CHECK-ANDROID: bl powl
 
   ret void
 }
@@ -384,7 +400,8 @@ define void @test_frem(float %float, double %double, fp128 %fp128) {
 
   %fremfp128 = frem fp128 %fp128, %fp128
   store fp128 %fremfp128, ptr @varfp128
-; CHECK: bl fmodl
+; CHECK-GNU: bl fmodf128
+; CHECK-ANDROID: bl fmodl
 
   ret void
 }
@@ -396,7 +413,8 @@ define void @test_fma(fp128 %fp128) {
 
   %fmafp128 = call fp128 @llvm.fma.f128(fp128 %fp128, fp128 %fp128, fp128 %fp128)
   store fp128 %fmafp128, ptr @varfp128
-; CHECK: bl fmal
+; CHECK-GNU: bl fmaf128
+; CHECK-ANDROID: bl fmal
 
   ret void
 }
diff --git a/llvm/test/CodeGen/AArch64/sincos-expansion.ll b/llvm/test/CodeGen/AArch64/sincos-expansion.ll
index 41ee40378b4fc..05e753aca0836 100644
--- a/llvm/test/CodeGen/AArch64/sincos-expansion.ll
+++ b/llvm/test/CodeGen/AArch64/sincos-expansion.ll
@@ -43,7 +43,7 @@ define fp128 @test_sincos_f128(fp128 %f) {
   %sin = call fp128 @sinl(fp128 %f) readnone
   %cos = call fp128 @cosl(fp128 %f) readnone
   %val = fadd fp128 %sin, %cos
-; CHECK: bl sincosl
+; CHECK: bl sincosf128
   ret fp128 %val
 }
 
diff --git a/llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization-nan.ll b/llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization-nan.ll
index 1d295a30a994b..644bab3698926 100644
--- a/llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization-nan.ll
+++ b/llvm/test/CodeGen/AArch64/vecreduce-fmax-legalization-nan.ll
@@ -583,7 +583,7 @@ define float @test_v3f32_ninf(<3 x float> %a) nounwind {
 define fp128 @test_v2f128(<2 x fp128> %a) nounwind {
 ; CHECK-LABEL: test_v2f128:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    b fmaxl
+; CHECK-NEXT:    b fmaxf128
   %b = call fp128 @llvm.vector.reduce.fmax.v2f128(<2 x fp128> %a)
   ret fp128 %b
 }
diff --git a/llvm/test/CodeGen/ARM/ldexp.ll b/llvm/test/CodeGen/ARM/ldexp.ll
index 941390ee94c1e..21df65c5faec5 100644
--- a/llvm/test/CodeGen/ARM/ldexp.ll
+++ b/llvm/test/CodeGen/ARM/ldexp.ll
@@ -38,7 +38,7 @@ entry:
 declare float @ldexpf(float, i32) memory(none)
 
 define fp128 @testExpl(fp128 %val, i32 %a) {
-; LINUX:    bl ldexpl
+; LINUX:    bl ldexpf128
 ; WINDOWS:    b.w ldexpl
 entry:
   %call = tail call fast fp128 @ldexpl(fp128 %val, i32 %a)
diff --git a/llvm/test/CodeGen/ARM/llvm.sincos.ll b/llvm/test/CodeGen/ARM/llvm.sincos.ll
index 9628405df6bcb..da1ad5ecbe008 100644
--- a/llvm/test/CodeGen/ARM/llvm.sincos.ll
+++ b/llvm/test/CodeGen/ARM/llvm.sincos.ll
@@ -206,7 +206,7 @@ define { fp128, fp128 } @test_sincos_f128(fp128 %a) {
 ; CHECK-NEXT:    mov r0, r1
 ; CHECK-NEXT:    mov r1, r2
 ; CHECK-NEXT:    mov r2, r12
-; CHECK-NEXT:    bl sincosl
+; CHECK-NEXT:    bl sincosf128
 ; CHECK-NEXT:    ldrd r2, r3, [sp, #16]
 ; CHECK-NEXT:    ldrd r12, r1, [sp, #8]
 ; CHECK-NEXT:    str r3, [r4, #28]
diff --git a/llvm/test/CodeGen/Mips/cconv/fmaxl_call.ll b/llvm/test/CodeGen/Mips/cconv/fmaxl_call.ll
index 0e3078edae45d..a2dfede48226c 100644
--- a/llvm/test/CodeGen/Mips/cconv/fmaxl_call.ll
+++ b/llvm/test/CodeGen/Mips/cconv/fmaxl_call.ll
@@ -8,7 +8,7 @@ define fp128 @call_fmaxl(fp128 %a, fp128 %b) {
 ; CHECK-NEXT:    .cfi_def_cfa_offset 16
 ; CHECK-NEXT:    sd $ra, 8($sp) # 8-byte Folded Spill
 ; CHECK-NEXT:    .cfi_offset 31, -8
-; CHECK-NEXT:    jal fmaxl
+; CHECK-NEXT:    jal fmaxf128
 ; CHECK-NEXT:    nop
 ; CHECK-NEXT:    mov.d $f12, $f0
 ; CHECK-NEXT:    jal f
diff --git a/llvm/test/CodeGen/Mips/cconv/roundl-call.ll b/llvm/test/CodeGen/Mips/cconv/roundl-call.ll
index 98bda89546e43..1339d16495942 100644
--- a/llvm/test/CodeGen/Mips/cconv/roundl-call.ll
+++ b/llvm/test/CodeGen/Mips/cconv/roundl-call.ll
@@ -25,7 +25,7 @@
 define void @roundl_call(fp128 %value) {
 entry:
 ; ALL-LABEL: roundl_call:
-; N32:          lw      $25, %call16(roundl)($gp)
+; N32:          lw      $25, %call16(roundf128)($gp)
 ; N64:          ld      $25, %call16(roundl)($gp)
 
 ; SOFT-FLOAT:   sd      $4, 8(${{[0-9]+}})
diff --git a/llvm/test/CodeGen/Mips/llrint-conv.ll b/llvm/test/CodeGen/Mips/llrint-conv.ll
index dcb4e5657e80b..6848a8f7e733f 100644
--- a/llvm/test/CodeGen/Mips/llrint-conv.ll
+++ b/llvm/test/CodeGen/Mips/llrint-conv.ll
@@ -36,7 +36,7 @@ entry:
 
 define signext i32 @testmswl(fp128 %x) {
 ; CHECK-LABEL: testmswl:
-; CHECK:       jal     llrintl
+; CHECK:       jal     llrintf128
 entry:
   %0 = tail call i64 @llvm.llrint.f128(fp128 %x)
   %conv = trunc i64 %0 to i32
@@ -45,7 +45,7 @@ entry:
 
 define i64 @testmsll(fp128 %x) {
 ; CHECK-LABEL: testmsll:
-; CHECK:       jal     llrintl
+; CHECK:       jal     llrintf128
 entry:
   %0 = tail call i64 @llvm.llrint.f128(fp128 %x)
   ret i64 %0
diff --git a/llvm/test/CodeGen/Mips/llround-conv.ll b/llvm/test/CodeGen/Mips/llround-conv.ll
index 77482a8663319..9ad97ccbda389 100644
--- a/llvm/test/CodeGen/Mips/llround-conv.ll
+++ b/llvm/test/CodeGen/Mips/llround-conv.ll
@@ -36,7 +36,7 @@ entry:
 
 define signext i32 @testmswl(fp128 %x) {
 ; CHECK-LABEL: testmswl:
-; CHECK:       jal     llroundl
+; CHECK:       jal     llroundf128
 entry:
   %0 = tail call i64 @llvm.llround.f128(fp128 %x)
   %conv = trunc i64 %0 to i32
@@ -45,7 +45,7 @@ entry:
 
 define i64 @testmsll(fp128 %x) {
 ; CHECK-LABEL: testmsll:
-; CHECK:       jal     llroundl
+; CHECK:       jal     llroundf128
 entry:
   %0 = tail call i64 @llvm.llround.f128(fp128 %x)
   ret i64 %0
diff --git a/llvm/test/CodeGen/Mips/lrint-conv.ll b/llvm/test/CodeGen/Mips/lrint-conv.ll
index bd3f7b3babe10..98748289d4047 100644
--- a/llvm/test/CodeGen/Mips/lrint-conv.ll
+++ b/llvm/test/CodeGen/Mips/lrint-conv.ll
@@ -36,7 +36,7 @@ entry:
 
 define signext i32 @testmswl(fp128 %x) {
 ; CHECK-LABEL: testmswl:
-; CHECK:       jal     lrintl
+; CHECK:       jal     lrintf128
 entry:
   %0 = tail call i64 @llvm.lrint.i64.f128(fp128 %x)
   %conv = trunc i64 %0 to i32
@@ -45,7 +45,7 @@ entry:
 
 define signext i64 @testmsll(fp128 %x) {
 ; CHECK-LABEL: testmsll:
-; CHECK:       jal     lrintl
+; CHECK:       jal     lrintf128
 entry:
   %0 = tail call i64 @llvm.lrint.i64.f128(fp128 %x)
   ret i64 %0
diff --git a/llvm/test/CodeGen/Mips/lround-conv.ll b/llvm/test/CodeGen/Mips/lround-conv.ll
index acca565c0fad2..f8f5228433694 100644
--- a/llvm/test/CodeGen/Mips/lround-conv.ll
+++ b/llvm/test/CodeGen/Mips/lround-conv.ll
@@ -36,7 +36,7 @@ entry:
 
 define signext i32 @testmswl(fp128 %x) {
 ; CHECK-LABEL: testmswl:
-; CHECK:       jal     lroundl
+; CHECK:       jal     lroundf128
 entry:
   %0 = tail call i64 @llvm.lround.i64.f128(fp128 %x)
   %conv = trunc i64 %0 to i32
@@ -45,7 +45,7 @@ entry:
 
 define signext i64 @testmsll(fp128 %x) {
 ; CHECK-LABEL: testmsll:
-; CHECK:       jal     lroundl
+; CHECK:       jal     lroundf128
 entry:
   %0 = tail call i64 @llvm.lround.i64.f128(fp128 %x)
   ret i64 %0
diff --git a/llvm/test/CodeGen/PowerPC/f128-arith.ll b/llvm/test/CodeGen/PowerPC/f128-arith.ll
index decc4a38f7ccd..e8fd4b88f3421 100644
--- a/llvm/test/CodeGen/PowerPC/f128-arith.ll
+++ b/llvm/test/CodeGen/PowerPC/f128-arith.ll
@@ -425,14 +425,19 @@ define fp128 @qp_sincos(ptr nocapture readonly %a) nounwind {
 ; CHECK-NEXT:    mflr r0
 ; CHECK-NEXT:    stdu r1, -64(r1)
 ; CHECK-NEXT:    std r0, 80(r1)
-; CHECK-NEXT:    addi r5, r1, 48
-; CHECK-NEXT:    addi r6, r1, 32
-; CHECK-NEXT:    lxv v2, 0(r3)
-; CHECK-NEXT:    bl sincosf128
+; CHECK-NEXT:    stxv v31, 48(r1) # 16-byte Folded Spill
+; CHECK-NEXT:    stxv v30, 32(r1) # 16-byte Folded Spill
+; CHECK-NEXT:    lxv v31, 0(r3)
+; CHECK-NEXT:    vmr v2, v31
+; CHECK-NEXT:    bl cosf128
+; CHECK-NEXT:    nop
+; CHECK-NEXT:    vmr v30, v2
+; CHECK-NEXT:    vmr v2, v31
+; CHECK-NEXT:    bl sinf128
 ; CHECK-NEXT:    nop
-; CHECK-NEXT:    lxv v2, 48(r1)
-; CHECK-NEXT:    lxv v3, 32(r1)
-; CHECK-NEXT:    xsmulqp v2, v3, v2
+; CHECK-NEXT:    xsmulqp v2, v30, v2
+; CHECK-NEXT:    lxv v31, 48(r1) # 16-byte Folded Reload
+; CHECK-NEXT:    lxv v30, 32(r1) # 16-byte Folded Reload
 ; CHECK-NEXT:    addi r1, r1, 64
 ; CHECK-NEXT:    ld r0, 16(r1)
 ; CHECK-NEXT:    mtlr r0
@@ -441,28 +446,31 @@ define fp128 @qp_sincos(ptr nocapture readonly %a) nounwind {
 ; CHECK-P8-LABEL: qp_sincos:
 ; CHECK-P8:       # %bb.0: # %entry
 ; CHECK-P8-NEXT:    mflr r0
-; CHECK-P8-NEXT:    std r29, -24(r1) # 8-byte Folded Spill
-; CHECK-P8-NEXT:    std r30, -16(r1) # 8-byte Folded Spill
-; CHECK-P8-NEXT:    stdu r1, -96(r1)
-; CHECK-P8-NEXT:    std r0, 112(r1)
-; CHECK-P8-NEXT:    addi r30, r1, 48
-; CHECK-P8-NEXT:    addi r29, r1, 32
+; CHECK-P8-NEXT:    stdu r1, -80(r1)
+; CHECK-P8-NEXT:    std r0, 96(r1)
+; CHECK-P8-NEXT:    li r4, 48
 ; CHECK-P8-NEXT:    lxvd2x vs0, 0, r3
-; CHECK-P8-NEXT:    mr r5, r30
-; CHECK-P8-NEXT:    mr r6, r29
-; CHECK-P8-NEXT:    xxswapd v2, vs0
-; CHECK-P8-NEXT:    bl sincosf128
+; CHECK-P8-NEXT:    stxvd2x v30, r1, r4 # 16-byte Folded Spill
+; CHECK-P8-NEXT:    li r4, 64
+; CHECK-P8-NEXT:    stxvd2x v31, r1, r4 # 16-byte Folded Spill
+; CHECK-P8-NEXT:    xxswapd v31, vs0
+; CHECK-P8-NEXT:    vmr v2, v31
+; CHECK-P8-NEXT:    bl cosf128
 ; CHECK-P8-NEXT:    nop
-; CHECK-P8-NEXT:    lxvd2x vs0, 0, r29
-; CHECK-P8-NEXT:    xxswapd v2, vs0
-; CHECK-P8-NEXT:    lxvd2x vs0, 0, r30
-; CHECK-P8-NEXT:    xxswapd v3, vs0
+; CHECK-P8-NEXT:    vmr v30, v2
+; CHECK-P8-NEXT:    vmr v2, v31
+; CHECK-P8-NEXT:    bl sinf128
+; CHECK-P8-NEXT:    nop
+; CHECK-P8-NEXT:    vmr v3, v2
+; CHECK-P8-NEXT:    vmr v2, v30
 ; CHECK-P8-NEXT:    bl __mulkf3
 ; CHECK-P8-NEXT:    nop
-; CHECK-P8-NEXT:    addi r1, r1, 96
+; CHECK-P8-NEXT:    li r3, 64
+; CHECK-P8-NEXT:    lxvd2x v31, r1, r3 # 16-byte Folded Reload
+; CHECK-P8-NEXT:    li r3, 48
+; CHECK-P8-NEXT:    lxvd2x v30, r1, r3 # 16-byte Folded Reload
+; CHECK-P8-NEXT:    addi r1, r1, 80
 ; CHECK-P8-NEXT:    ld r0, 16(r1)
-; CHECK-P8-NEXT:    ld r30, -16(r1) # 8-byte Folded Reload
-; CHECK-P8-NEXT:    ld r29, -24(r1) # 8-byte Folded Reload
 ; CHECK-P8-NEXT:    mtlr r0
 ; CHECK-P8-NEXT:    blr
 entry:
diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-fmax-03.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-fmax-03.ll
index 21e7c6e586dfe..83f66d0ef15f4 100644
--- a/llvm/test/CodeGen/SystemZ/atomicrmw-fmax-03.ll
+++ b/llvm/test/CodeGen/SystemZ/atomicrmw-fmax-03.ll
@@ -19,7 +19,7 @@ define void @f1(ptr %ret, ptr %src, ptr %b) {
 ; CHECK: la %r4, 160(%r15)
 ; CHECK: std [[FSL]], 176(%r15)
 ; CHECK: std [[FSH]], 184(%r15)
-; CHECK: brasl %r14, fmaxl at PLT
+; CHECK: brasl %r14, fmaxf128 at PLT
 ; CHECK: lg [[RH:%r[0-9]+]], 200(%r15)
 ; CHECK: lg [[RL:%r[0-9]+]], 192(%r15)
 ; CHECK: lgdr [[RSH:%r[0-9]+]], [[FSH]]
diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-fmin-03.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-fmin-03.ll
index 1c6f8e20aa4f8..c48ba3ff661f3 100644
--- a/llvm/test/CodeGen/SystemZ/atomicrmw-fmin-03.ll
+++ b/llvm/test/CodeGen/SystemZ/atomicrmw-fmin-03.ll
@@ -19,7 +19,7 @@ define void @f1(ptr %ret, ptr %src, ptr %b) {
 ; CHECK: la %r4, 160(%r15)
 ; CHECK: std [[FSL]], 176(%r15)
 ; CHECK: std [[FSH]], 184(%r15)
-; CHECK: brasl %r14, fminl at PLT
+; CHECK: brasl %r14, fminf128 at PLT
 ; CHECK: lg [[RH:%r[0-9]+]], 200(%r15)
 ; CHECK: lg [[RL:%r[0-9]+]], 192(%r15)
 ; CHECK: lgdr [[RSH:%r[0-9]+]], [[FSH]]
diff --git a/llvm/test/CodeGen/SystemZ/fp-libcall.ll b/llvm/test/CodeGen/SystemZ/fp-libcall.ll
index 5069b9b257b80..51f91315b284d 100644
--- a/llvm/test/CodeGen/SystemZ/fp-libcall.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-libcall.ll
@@ -39,7 +39,7 @@ define double @f5(double %x, double %y) {
 
 define fp128 @f6(fp128 %x, fp128 %y) {
 ; CHECK-LABEL: f6:
-; CHECK: brasl %r14, powl at PLT
+; CHECK: brasl %r14, powf128 at PLT
   %tmp = call fp128 @llvm.pow.f128(fp128 %x, fp128 %y)
   ret fp128 %tmp
 }
@@ -60,7 +60,7 @@ define double @f8(double %x) {
 
 define fp128 @f9(fp128 %x) {
 ; CHECK-LABEL: f9:
-; CHECK: brasl %r14, sinl at PLT
+; CHECK: brasl %r14, sinf128 at PLT
   %tmp = call fp128 @llvm.sin.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -81,7 +81,7 @@ define double @f11(double %x) {
 
 define fp128 @f12(fp128 %x) {
 ; CHECK-LABEL: f12:
-; CHECK: brasl %r14, cosl at PLT
+; CHECK: brasl %r14, cosf128 at PLT
   %tmp = call fp128 @llvm.cos.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -102,7 +102,7 @@ define double @f14(double %x) {
 
 define fp128 @f15(fp128 %x) {
 ; CHECK-LABEL: f15:
-; CHECK: brasl %r14, expl at PLT
+; CHECK: brasl %r14, expf128 at PLT
   %tmp = call fp128 @llvm.exp.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -123,7 +123,7 @@ define double @f17(double %x) {
 
 define fp128 @f18(fp128 %x) {
 ; CHECK-LABEL: f18:
-; CHECK: brasl %r14, exp2l at PLT
+; CHECK: brasl %r14, exp2f128 at PLT
   %tmp = call fp128 @llvm.exp2.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -144,7 +144,7 @@ define double @f20(double %x) {
 
 define fp128 @f21(fp128 %x) {
 ; CHECK-LABEL: f21:
-; CHECK: brasl %r14, logl at PLT
+; CHECK: brasl %r14, logf128 at PLT
   %tmp = call fp128 @llvm.log.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -165,7 +165,7 @@ define double @f23(double %x) {
 
 define fp128 @f24(fp128 %x) {
 ; CHECK-LABEL: f24:
-; CHECK: brasl %r14, log2l at PLT
+; CHECK: brasl %r14, log2f128 at PLT
   %tmp = call fp128 @llvm.log2.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -186,7 +186,7 @@ define double @f26(double %x) {
 
 define fp128 @f27(fp128 %x) {
 ; CHECK-LABEL: f27:
-; CHECK: brasl %r14, log10l at PLT
+; CHECK: brasl %r14, log10f128 at PLT
   %tmp = call fp128 @llvm.log10.f128(fp128 %x)
   ret fp128 %tmp
 }
@@ -207,7 +207,7 @@ define double @f29(double %x, double %y) {
 
 define fp128 @f30(fp128 %x, fp128 %y) {
 ; CHECK-LABEL: f30:
-; CHECK: brasl %r14, fminl at PLT
+; CHECK: brasl %r14, fminf128 at PLT
   %tmp = call fp128 @llvm.minnum.f128(fp128 %x, fp128 %y)
   ret fp128 %tmp
 }
@@ -238,7 +238,7 @@ define double @f32(double %x, double %y) {
 
 define fp128 @f33(fp128 %x, fp128 %y) {
 ; CHECK-LABEL: f33:
-; CHECK: brasl %r14, fmaxl at PLT
+; CHECK: brasl %r14, fmaxf128 at PLT
   %tmp = call fp128 @llvm.maxnum.f128(fp128 %x, fp128 %y)
   ret fp128 %tmp
 }
diff --git a/llvm/test/CodeGen/SystemZ/fp-mul-13.ll b/llvm/test/CodeGen/SystemZ/fp-mul-13.ll
index e6870fb9a81db..70cd966fbb1b4 100644
--- a/llvm/test/CodeGen/SystemZ/fp-mul-13.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-mul-13.ll
@@ -4,7 +4,7 @@ declare fp128 @llvm.fma.f128(fp128 %f1, fp128 %f2, fp128 %f3)
 
 define void @f1(ptr %ptr1, ptr %ptr2, ptr %ptr3, ptr %dst) {
 ; CHECK-LABEL: f1:
-; CHECK: brasl %r14, fmal
+; CHECK: brasl %r14, fmaf128
 ; CHECK: br %r14
   %f1 = load fp128, ptr %ptr1
   %f2 = load fp128, ptr %ptr2
diff --git a/llvm/test/CodeGen/SystemZ/fp-round-01.ll b/llvm/test/CodeGen/SystemZ/fp-round-01.ll
index 21b354c7a83c4..4a3ea23966d80 100644
--- a/llvm/test/CodeGen/SystemZ/fp-round-01.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-round-01.ll
@@ -70,7 +70,7 @@ define double @f5(double %f) {
 declare fp128 @llvm.nearbyint.f128(fp128 %f)
 define void @f6(ptr %ptr) {
 ; CHECK-LABEL: f6:
-; CHECK: brasl %r14, nearbyintl at PLT
+; CHECK: brasl %r14, nearbyintf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.nearbyint.f128(fp128 %src)
@@ -114,7 +114,7 @@ define double @f8(double %f) {
 declare fp128 @llvm.floor.f128(fp128 %f)
 define void @f9(ptr %ptr) {
 ; CHECK-LABEL: f9:
-; CHECK: brasl %r14, floorl at PLT
+; CHECK: brasl %r14, floorf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.floor.f128(fp128 %src)
@@ -158,7 +158,7 @@ define double @f11(double %f) {
 declare fp128 @llvm.ceil.f128(fp128 %f)
 define void @f12(ptr %ptr) {
 ; CHECK-LABEL: f12:
-; CHECK: brasl %r14, ceill at PLT
+; CHECK: brasl %r14, ceilf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.ceil.f128(fp128 %src)
@@ -190,7 +190,7 @@ define double @f14(double %f) {
 declare fp128 @llvm.trunc.f128(fp128 %f)
 define void @f15(ptr %ptr) {
 ; CHECK-LABEL: f15:
-; CHECK: brasl %r14, truncl at PLT
+; CHECK: brasl %r14, truncf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.trunc.f128(fp128 %src)
@@ -234,7 +234,7 @@ define double @f17(double %f) {
 declare fp128 @llvm.round.f128(fp128 %f)
 define void @f18(ptr %ptr) {
 ; CHECK-LABEL: f18:
-; CHECK: brasl %r14, roundl at PLT
+; CHECK: brasl %r14, roundf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.round.f128(fp128 %src)
@@ -266,7 +266,7 @@ define double @f20(double %f) {
 declare fp128 @llvm.roundeven.f128(fp128 %f)
 define void @f21(ptr %ptr) {
 ; CHECK-LABEL: f21:
-; CHECK: brasl %r14, roundevenl at PLT
+; CHECK: brasl %r14, roundevenf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.roundeven.f128(fp128 %src)
diff --git a/llvm/test/CodeGen/SystemZ/fp-sincos-01.ll b/llvm/test/CodeGen/SystemZ/fp-sincos-01.ll
index 4a38d7afba2c9..03da3e4b8c5ac 100644
--- a/llvm/test/CodeGen/SystemZ/fp-sincos-01.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-sincos-01.ll
@@ -51,7 +51,7 @@ define double @f2_errno(double %x) {
 
 define fp128 @f3(fp128 %x) {
 ; CHECK-OPT-LABEL: f3:
-; CHECK-OPT: brasl %r14, sincosl at PLT
+; CHECK-OPT: brasl %r14, sincosf128 at PLT
 ; CHECK-OPT: axbr
   %tmp1 = call fp128 @sinl(fp128 %x) readnone
   %tmp2 = call fp128 @cosl(fp128 %x) readnone
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-mul-13.ll b/llvm/test/CodeGen/SystemZ/fp-strict-mul-13.ll
index 4247c97533746..44ef22add70f6 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-mul-13.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-mul-13.ll
@@ -4,7 +4,7 @@ declare fp128 @llvm.experimental.constrained.fma.f128(fp128 %f1, fp128 %f2, fp12
 
 define void @f1(ptr %ptr1, ptr %ptr2, ptr %ptr3, ptr %dst) #0 {
 ; CHECK-LABEL: f1:
-; CHECK: brasl %r14, fmal
+; CHECK: brasl %r14, fmaf128
 ; CHECK: br %r14
   %f1 = load fp128, ptr %ptr1
   %f2 = load fp128, ptr %ptr2
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-round-01.ll b/llvm/test/CodeGen/SystemZ/fp-strict-round-01.ll
index 95a5fa1af832b..5c825161541a1 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-round-01.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-round-01.ll
@@ -88,7 +88,7 @@ define double @f5(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.nearbyint.f128(fp128, metadata, metadata)
 define void @f6(ptr %ptr) #0 {
 ; CHECK-LABEL: f6:
-; CHECK: brasl %r14, nearbyintl at PLT
+; CHECK: brasl %r14, nearbyintf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.nearbyint.f128(
@@ -141,7 +141,7 @@ define double @f8(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.floor.f128(fp128, metadata)
 define void @f9(ptr %ptr) #0 {
 ; CHECK-LABEL: f9:
-; CHECK: brasl %r14, floorl at PLT
+; CHECK: brasl %r14, floorf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.floor.f128(
@@ -193,7 +193,7 @@ define double @f11(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.ceil.f128(fp128, metadata)
 define void @f12(ptr %ptr) #0 {
 ; CHECK-LABEL: f12:
-; CHECK: brasl %r14, ceill at PLT
+; CHECK: brasl %r14, ceilf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.ceil.f128(
@@ -245,7 +245,7 @@ define double @f14(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.trunc.f128(fp128, metadata)
 define void @f15(ptr %ptr) #0 {
 ; CHECK-LABEL: f15:
-; CHECK: brasl %r14, truncl at PLT
+; CHECK: brasl %r14, truncf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.trunc.f128(
@@ -297,7 +297,7 @@ define double @f17(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.round.f128(fp128, metadata)
 define void @f18(ptr %ptr) #0 {
 ; CHECK-LABEL: f18:
-; CHECK: brasl %r14, roundl at PLT
+; CHECK: brasl %r14, roundf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.round.f128(
@@ -335,7 +335,7 @@ define double @f20(double %f) #0 {
 declare fp128 @llvm.experimental.constrained.roundeven.f128(fp128, metadata)
 define void @f21(ptr %ptr) #0 {
 ; CHECK-LABEL: f21:
-; CHECK: brasl %r14, roundevenl at PLT
+; CHECK: brasl %r14, roundevenf128 at PLT
 ; CHECK: br %r14
   %src = load fp128, ptr %ptr
   %res = call fp128 @llvm.experimental.constrained.roundeven.f128(
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
index a85b53ea62ac7..f5ebc55617cd4 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
@@ -452,7 +452,7 @@ define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmal
+; X86-NEXT:    calll fmaf128
 ; X86-NEXT:    addl $60, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -473,7 +473,7 @@ define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %r8
-; WIN-NEXT:    callq fmal
+; WIN-NEXT:    callq fmaf128
 ; WIN-NEXT:    addq $88, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -500,7 +500,7 @@ define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmal
+; WIN-X86-NEXT:    calll _fmaf128
 ; WIN-X86-NEXT:    addl $52, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -552,7 +552,7 @@ define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmodl
+; X86-NEXT:    calll fmodf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -570,7 +570,7 @@ define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq fmodl
+; WIN-NEXT:    callq fmodf128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -593,7 +593,7 @@ define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmodl
+; WIN-X86-NEXT:    calll _fmodf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -641,7 +641,7 @@ define fp128 @ceil(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll ceill
+; X86-NEXT:    calll ceilf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -656,7 +656,7 @@ define fp128 @ceil(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq ceill
+; WIN-NEXT:    callq ceilf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -675,7 +675,7 @@ define fp128 @ceil(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _ceill
+; WIN-X86-NEXT:    calll _ceilf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -723,7 +723,7 @@ define fp128 @acos(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll acosl
+; X86-NEXT:    calll acosf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -738,7 +738,7 @@ define fp128 @acos(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq acosl
+; WIN-NEXT:    callq acosf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -757,7 +757,7 @@ define fp128 @acos(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _acosl
+; WIN-X86-NEXT:    calll _acosf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -805,7 +805,7 @@ define fp128 @cos(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll cosl
+; X86-NEXT:    calll cosf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -820,7 +820,7 @@ define fp128 @cos(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq cosl
+; WIN-NEXT:    callq cosf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -839,7 +839,7 @@ define fp128 @cos(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _cosl
+; WIN-X86-NEXT:    calll _cosf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -887,7 +887,7 @@ define fp128 @cosh(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll coshl
+; X86-NEXT:    calll coshf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -902,7 +902,7 @@ define fp128 @cosh(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq coshl
+; WIN-NEXT:    callq coshf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -921,7 +921,7 @@ define fp128 @cosh(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _coshl
+; WIN-X86-NEXT:    calll _coshf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -969,7 +969,7 @@ define fp128 @exp(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll expl
+; X86-NEXT:    calll expf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -984,7 +984,7 @@ define fp128 @exp(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq expl
+; WIN-NEXT:    callq expf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1003,7 +1003,7 @@ define fp128 @exp(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _expl
+; WIN-X86-NEXT:    calll _expf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1051,7 +1051,7 @@ define fp128 @exp2(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll exp2l
+; X86-NEXT:    calll exp2f128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1066,7 +1066,7 @@ define fp128 @exp2(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq exp2l
+; WIN-NEXT:    callq exp2f128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1085,7 +1085,7 @@ define fp128 @exp2(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _exp2l
+; WIN-X86-NEXT:    calll _exp2f128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1133,7 +1133,7 @@ define fp128 @floor(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll floorl
+; X86-NEXT:    calll floorf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1148,7 +1148,7 @@ define fp128 @floor(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq floorl
+; WIN-NEXT:    callq floorf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1167,7 +1167,7 @@ define fp128 @floor(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _floorl
+; WIN-X86-NEXT:    calll _floorf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1215,7 +1215,7 @@ define fp128 @log(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll logl
+; X86-NEXT:    calll logf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1230,7 +1230,7 @@ define fp128 @log(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq logl
+; WIN-NEXT:    callq logf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1249,7 +1249,7 @@ define fp128 @log(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _logl
+; WIN-X86-NEXT:    calll _logf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1297,7 +1297,7 @@ define fp128 @log10(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll log10l
+; X86-NEXT:    calll log10f128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1312,7 +1312,7 @@ define fp128 @log10(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq log10l
+; WIN-NEXT:    callq log10f128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1331,7 +1331,7 @@ define fp128 @log10(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _log10l
+; WIN-X86-NEXT:    calll _log10f128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1379,7 +1379,7 @@ define fp128 @log2(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll log2l
+; X86-NEXT:    calll log2f128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1394,7 +1394,7 @@ define fp128 @log2(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq log2l
+; WIN-NEXT:    callq log2f128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1413,7 +1413,7 @@ define fp128 @log2(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _log2l
+; WIN-X86-NEXT:    calll _log2f128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1465,7 +1465,7 @@ define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmaxl
+; X86-NEXT:    calll fmaxf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1483,7 +1483,7 @@ define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq fmaxl
+; WIN-NEXT:    callq fmaxf128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1506,7 +1506,7 @@ define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmaxl
+; WIN-X86-NEXT:    calll _fmaxf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1558,7 +1558,7 @@ define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fminl
+; X86-NEXT:    calll fminf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1576,7 +1576,7 @@ define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq fminl
+; WIN-NEXT:    callq fminf128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1599,7 +1599,7 @@ define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fminl
+; WIN-X86-NEXT:    calll _fminf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1647,7 +1647,7 @@ define fp128 @nearbyint(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll nearbyintl
+; X86-NEXT:    calll nearbyintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1662,7 +1662,7 @@ define fp128 @nearbyint(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq nearbyintl
+; WIN-NEXT:    callq nearbyintf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1681,7 +1681,7 @@ define fp128 @nearbyint(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _nearbyintl
+; WIN-X86-NEXT:    calll _nearbyintf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1733,7 +1733,7 @@ define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll powl
+; X86-NEXT:    calll powf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1751,7 +1751,7 @@ define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq powl
+; WIN-NEXT:    callq powf128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1774,7 +1774,7 @@ define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _powl
+; WIN-X86-NEXT:    calll _powf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1913,7 +1913,7 @@ define fp128 @rint(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll rintl
+; X86-NEXT:    calll rintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1928,7 +1928,7 @@ define fp128 @rint(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq rintl
+; WIN-NEXT:    callq rintf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1947,7 +1947,7 @@ define fp128 @rint(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _rintl
+; WIN-X86-NEXT:    calll _rintf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1995,7 +1995,7 @@ define fp128 @round(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll roundl
+; X86-NEXT:    calll roundf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2010,7 +2010,7 @@ define fp128 @round(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq roundl
+; WIN-NEXT:    callq roundf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2029,7 +2029,7 @@ define fp128 @round(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _roundl
+; WIN-X86-NEXT:    calll _roundf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2077,7 +2077,7 @@ define fp128 @roundeven(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll roundevenl
+; X86-NEXT:    calll roundevenf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2092,7 +2092,7 @@ define fp128 @roundeven(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq roundevenl
+; WIN-NEXT:    callq roundevenf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2111,7 +2111,7 @@ define fp128 @roundeven(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _roundevenl
+; WIN-X86-NEXT:    calll _roundevenf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2159,7 +2159,7 @@ define fp128 @asin(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll asinl
+; X86-NEXT:    calll asinf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2174,7 +2174,7 @@ define fp128 @asin(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq asinl
+; WIN-NEXT:    callq asinf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2193,7 +2193,7 @@ define fp128 @asin(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _asinl
+; WIN-X86-NEXT:    calll _asinf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2241,7 +2241,7 @@ define fp128 @sin(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sinl
+; X86-NEXT:    calll sinf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2256,7 +2256,7 @@ define fp128 @sin(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sinl
+; WIN-NEXT:    callq sinf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2275,7 +2275,7 @@ define fp128 @sin(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sinl
+; WIN-X86-NEXT:    calll _sinf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2323,7 +2323,7 @@ define fp128 @sinh(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sinhl
+; X86-NEXT:    calll sinhf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2338,7 +2338,7 @@ define fp128 @sinh(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sinhl
+; WIN-NEXT:    callq sinhf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2357,7 +2357,7 @@ define fp128 @sinh(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sinhl
+; WIN-X86-NEXT:    calll _sinhf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2405,7 +2405,7 @@ define fp128 @sqrt(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sqrtl
+; X86-NEXT:    calll sqrtf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2420,7 +2420,7 @@ define fp128 @sqrt(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sqrtl
+; WIN-NEXT:    callq sqrtf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2439,7 +2439,7 @@ define fp128 @sqrt(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sqrtl
+; WIN-X86-NEXT:    calll _sqrtf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2487,7 +2487,7 @@ define fp128 @atan(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll atanl
+; X86-NEXT:    calll atanf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2502,7 +2502,7 @@ define fp128 @atan(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq atanl
+; WIN-NEXT:    callq atanf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2521,7 +2521,7 @@ define fp128 @atan(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _atanl
+; WIN-X86-NEXT:    calll _atanf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2573,7 +2573,7 @@ define fp128 @atan2(fp128 %x, fp128 %y) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll atan2l
+; X86-NEXT:    calll atan2f128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2591,7 +2591,7 @@ define fp128 @atan2(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq atan2l
+; WIN-NEXT:    callq atan2f128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2614,7 +2614,7 @@ define fp128 @atan2(fp128 %x, fp128 %y) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _atan2l
+; WIN-X86-NEXT:    calll _atan2f128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2662,7 +2662,7 @@ define fp128 @tan(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll tanl
+; X86-NEXT:    calll tanf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2677,7 +2677,7 @@ define fp128 @tan(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq tanl
+; WIN-NEXT:    callq tanf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2696,7 +2696,7 @@ define fp128 @tan(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _tanl
+; WIN-X86-NEXT:    calll _tanf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2744,7 +2744,7 @@ define fp128 @tanh(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll tanhl
+; X86-NEXT:    calll tanhf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2759,7 +2759,7 @@ define fp128 @tanh(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq tanhl
+; WIN-NEXT:    callq tanhf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2778,7 +2778,7 @@ define fp128 @tanh(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _tanhl
+; WIN-X86-NEXT:    calll _tanhf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2826,7 +2826,7 @@ define fp128 @trunc(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll truncl
+; X86-NEXT:    calll truncf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2841,7 +2841,7 @@ define fp128 @trunc(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq truncl
+; WIN-NEXT:    callq truncf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2860,7 +2860,7 @@ define fp128 @trunc(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _truncl
+; WIN-X86-NEXT:    calll _truncf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2903,7 +2903,7 @@ define i32 @lrint(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; X86-NEXT:    calll lrintl
+; X86-NEXT:    calll lrintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    retl
 ;
@@ -2913,7 +2913,7 @@ define i32 @lrint(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq lrintl
+; WIN-NEXT:    callq lrintf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2923,7 +2923,7 @@ define i32 @lrint(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; WIN-X86-NEXT:    calll _lrintl
+; WIN-X86-NEXT:    calll _lrintf128
 ; WIN-X86-NEXT:    addl $16, %esp
 ; WIN-X86-NEXT:    retl
 entry:
@@ -2953,7 +2953,7 @@ define i64 @llrint(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; X86-NEXT:    calll llrintl
+; X86-NEXT:    calll llrintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    retl
 ;
@@ -2963,7 +2963,7 @@ define i64 @llrint(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq llrintl
+; WIN-NEXT:    callq llrintf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2973,7 +2973,7 @@ define i64 @llrint(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; WIN-X86-NEXT:    calll _llrintl
+; WIN-X86-NEXT:    calll _llrintf128
 ; WIN-X86-NEXT:    addl $16, %esp
 ; WIN-X86-NEXT:    retl
 entry:
@@ -3003,7 +3003,7 @@ define i32 @lround(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; X86-NEXT:    calll lroundl
+; X86-NEXT:    calll lroundf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    retl
 ;
@@ -3013,7 +3013,7 @@ define i32 @lround(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq lroundl
+; WIN-NEXT:    callq lroundf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -3023,7 +3023,7 @@ define i32 @lround(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; WIN-X86-NEXT:    calll _lroundl
+; WIN-X86-NEXT:    calll _lroundf128
 ; WIN-X86-NEXT:    addl $16, %esp
 ; WIN-X86-NEXT:    retl
 entry:
@@ -3053,7 +3053,7 @@ define i64 @llround(fp128 %x) nounwind strictfp {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; X86-NEXT:    calll llroundl
+; X86-NEXT:    calll llroundf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    retl
 ;
@@ -3063,7 +3063,7 @@ define i64 @llround(fp128 %x) nounwind strictfp {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq llroundl
+; WIN-NEXT:    callq llroundf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -3073,7 +3073,7 @@ define i64 @llround(fp128 %x) nounwind strictfp {
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; WIN-X86-NEXT:    pushl {{[0-9]+}}(%esp)
-; WIN-X86-NEXT:    calll _llroundl
+; WIN-X86-NEXT:    calll _llroundf128
 ; WIN-X86-NEXT:    addl $16, %esp
 ; WIN-X86-NEXT:    retl
 entry:
diff --git a/llvm/test/CodeGen/X86/fp128-libcalls.ll b/llvm/test/CodeGen/X86/fp128-libcalls.ll
index 05c02a2139b5a..f5edf31f9d242 100644
--- a/llvm/test/CodeGen/X86/fp128-libcalls.ll
+++ b/llvm/test/CodeGen/X86/fp128-libcalls.ll
@@ -841,7 +841,7 @@ define dso_local void @Test128Rem(fp128 %d1, fp128 %d2) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmodl
+; X86-NEXT:    calll fmodf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -857,7 +857,7 @@ define dso_local void @Test128Rem(fp128 %d1, fp128 %d2) nounwind {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq fmodl
+; WIN-NEXT:    callq fmodf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
@@ -879,7 +879,7 @@ define dso_local void @Test128Rem(fp128 %d1, fp128 %d2) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmodl
+; WIN-X86-NEXT:    calll _fmodf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -933,7 +933,7 @@ define dso_local void @Test128_1Rem(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl vf128+4
 ; X86-NEXT:    pushl vf128
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmodl
+; X86-NEXT:    calll fmodf128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -949,7 +949,7 @@ define dso_local void @Test128_1Rem(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq fmodl
+; WIN-NEXT:    callq fmodf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
@@ -971,7 +971,7 @@ define dso_local void @Test128_1Rem(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl _vf128+4
 ; WIN-X86-NEXT:    pushl _vf128
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmodl
+; WIN-X86-NEXT:    calll _fmodf128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1018,7 +1018,7 @@ define dso_local void @Test128Sqrt(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sqrtl
+; X86-NEXT:    calll sqrtf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1031,7 +1031,7 @@ define dso_local void @Test128Sqrt(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sqrtl
+; WIN-NEXT:    callq sqrtf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1049,7 +1049,7 @@ define dso_local void @Test128Sqrt(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sqrtl
+; WIN-X86-NEXT:    calll _sqrtf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1096,7 +1096,7 @@ define dso_local void @Test128Sin(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sinl
+; X86-NEXT:    calll sinf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1109,7 +1109,7 @@ define dso_local void @Test128Sin(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sinl
+; WIN-NEXT:    callq sinf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1127,7 +1127,7 @@ define dso_local void @Test128Sin(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sinl
+; WIN-X86-NEXT:    calll _sinf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1174,7 +1174,7 @@ define dso_local void @Test128Cos(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll cosl
+; X86-NEXT:    calll cosf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1187,7 +1187,7 @@ define dso_local void @Test128Cos(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq cosl
+; WIN-NEXT:    callq cosf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1205,7 +1205,7 @@ define dso_local void @Test128Cos(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _cosl
+; WIN-X86-NEXT:    calll _cosf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1252,7 +1252,7 @@ define dso_local void @Test128Ceil(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll ceill
+; X86-NEXT:    calll ceilf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1265,7 +1265,7 @@ define dso_local void @Test128Ceil(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq ceill
+; WIN-NEXT:    callq ceilf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1283,7 +1283,7 @@ define dso_local void @Test128Ceil(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _ceill
+; WIN-X86-NEXT:    calll _ceilf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1330,7 +1330,7 @@ define dso_local void @Test128Floor(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll floorl
+; X86-NEXT:    calll floorf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1343,7 +1343,7 @@ define dso_local void @Test128Floor(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq floorl
+; WIN-NEXT:    callq floorf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1361,7 +1361,7 @@ define dso_local void @Test128Floor(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _floorl
+; WIN-X86-NEXT:    calll _floorf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1408,7 +1408,7 @@ define dso_local void @Test128Trunc(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll truncl
+; X86-NEXT:    calll truncf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1421,7 +1421,7 @@ define dso_local void @Test128Trunc(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq truncl
+; WIN-NEXT:    callq truncf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1439,7 +1439,7 @@ define dso_local void @Test128Trunc(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _truncl
+; WIN-X86-NEXT:    calll _truncf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1486,7 +1486,7 @@ define dso_local void @Test128Nearbyint(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll nearbyintl
+; X86-NEXT:    calll nearbyintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1499,7 +1499,7 @@ define dso_local void @Test128Nearbyint(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq nearbyintl
+; WIN-NEXT:    callq nearbyintf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1517,7 +1517,7 @@ define dso_local void @Test128Nearbyint(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _nearbyintl
+; WIN-X86-NEXT:    calll _nearbyintf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1564,7 +1564,7 @@ define dso_local void @Test128Rint(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll rintl
+; X86-NEXT:    calll rintf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1577,7 +1577,7 @@ define dso_local void @Test128Rint(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq rintl
+; WIN-NEXT:    callq rintf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1595,7 +1595,7 @@ define dso_local void @Test128Rint(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _rintl
+; WIN-X86-NEXT:    calll _rintf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1642,7 +1642,7 @@ define dso_local void @Test128Round(fp128 %d1) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll roundl
+; X86-NEXT:    calll roundf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, vf128
@@ -1655,7 +1655,7 @@ define dso_local void @Test128Round(fp128 %d1) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq roundl
+; WIN-NEXT:    callq roundf128
 ; WIN-NEXT:    movaps %xmm0, vf128(%rip)
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
@@ -1673,7 +1673,7 @@ define dso_local void @Test128Round(fp128 %d1) nounwind {
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl 8(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _roundl
+; WIN-X86-NEXT:    calll _roundf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1723,7 +1723,7 @@ define fp128 @Test128FMA(fp128 %a, fp128 %b, fp128 %c) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll fmal
+; X86-NEXT:    calll fmaf128
 ; X86-NEXT:    addl $60, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1744,7 +1744,7 @@ define fp128 @Test128FMA(fp128 %a, fp128 %b, fp128 %c) nounwind {
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %r8
-; WIN-NEXT:    callq fmal
+; WIN-NEXT:    callq fmaf128
 ; WIN-NEXT:    addq $88, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1771,7 +1771,7 @@ define fp128 @Test128FMA(fp128 %a, fp128 %b, fp128 %c) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _fmal
+; WIN-X86-NEXT:    calll _fmaf128
 ; WIN-X86-NEXT:    addl $52, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1814,7 +1814,7 @@ define fp128 @Test128Acos(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll acosl
+; X86-NEXT:    calll acosf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1829,7 +1829,7 @@ define fp128 @Test128Acos(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq acosl
+; WIN-NEXT:    callq acosf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1848,7 +1848,7 @@ define fp128 @Test128Acos(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _acosl
+; WIN-X86-NEXT:    calll _acosf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1889,7 +1889,7 @@ define fp128 @Test128Asin(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll asinl
+; X86-NEXT:    calll asinf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1904,7 +1904,7 @@ define fp128 @Test128Asin(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq asinl
+; WIN-NEXT:    callq asinf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1923,7 +1923,7 @@ define fp128 @Test128Asin(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _asinl
+; WIN-X86-NEXT:    calll _asinf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -1964,7 +1964,7 @@ define fp128 @Test128Atan(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll atanl
+; X86-NEXT:    calll atanf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -1979,7 +1979,7 @@ define fp128 @Test128Atan(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq atanl
+; WIN-NEXT:    callq atanf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -1998,7 +1998,7 @@ define fp128 @Test128Atan(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _atanl
+; WIN-X86-NEXT:    calll _atanf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2043,7 +2043,7 @@ define fp128 @Test128Atan2(fp128 %a, fp128 %b) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll atan2l
+; X86-NEXT:    calll atan2f128
 ; X86-NEXT:    addl $44, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2061,7 +2061,7 @@ define fp128 @Test128Atan2(fp128 %a, fp128 %b) nounwind {
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rdx
-; WIN-NEXT:    callq atan2l
+; WIN-NEXT:    callq atan2f128
 ; WIN-NEXT:    addq $72, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2084,7 +2084,7 @@ define fp128 @Test128Atan2(fp128 %a, fp128 %b) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _atan2l
+; WIN-X86-NEXT:    calll _atan2f128
 ; WIN-X86-NEXT:    addl $36, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2125,7 +2125,7 @@ define fp128 @Test128Cosh(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll coshl
+; X86-NEXT:    calll coshf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2140,7 +2140,7 @@ define fp128 @Test128Cosh(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq coshl
+; WIN-NEXT:    callq coshf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2159,7 +2159,7 @@ define fp128 @Test128Cosh(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _coshl
+; WIN-X86-NEXT:    calll _coshf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2200,7 +2200,7 @@ define fp128 @Test128Sinh(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll sinhl
+; X86-NEXT:    calll sinhf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2215,7 +2215,7 @@ define fp128 @Test128Sinh(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq sinhl
+; WIN-NEXT:    callq sinhf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2234,7 +2234,7 @@ define fp128 @Test128Sinh(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _sinhl
+; WIN-X86-NEXT:    calll _sinhf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2275,7 +2275,7 @@ define fp128 @Test128Tan(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll tanl
+; X86-NEXT:    calll tanf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2290,7 +2290,7 @@ define fp128 @Test128Tan(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq tanl
+; WIN-NEXT:    callq tanf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2309,7 +2309,7 @@ define fp128 @Test128Tan(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _tanl
+; WIN-X86-NEXT:    calll _tanf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
@@ -2350,7 +2350,7 @@ define fp128 @Test128Tanh(fp128 %a) nounwind {
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl {{[0-9]+}}(%esp)
 ; X86-NEXT:    pushl %eax
-; X86-NEXT:    calll tanhl
+; X86-NEXT:    calll tanhf128
 ; X86-NEXT:    addl $28, %esp
 ; X86-NEXT:    movaps (%esp), %xmm0
 ; X86-NEXT:    movaps %xmm0, (%esi)
@@ -2365,7 +2365,7 @@ define fp128 @Test128Tanh(fp128 %a) nounwind {
 ; WIN-NEXT:    movaps (%rcx), %xmm0
 ; WIN-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
 ; WIN-NEXT:    leaq {{[0-9]+}}(%rsp), %rcx
-; WIN-NEXT:    callq tanhl
+; WIN-NEXT:    callq tanhf128
 ; WIN-NEXT:    addq $56, %rsp
 ; WIN-NEXT:    retq
 ;
@@ -2384,7 +2384,7 @@ define fp128 @Test128Tanh(fp128 %a) nounwind {
 ; WIN-X86-NEXT:    pushl 16(%ebp)
 ; WIN-X86-NEXT:    pushl 12(%ebp)
 ; WIN-X86-NEXT:    pushl %eax
-; WIN-X86-NEXT:    calll _tanhl
+; WIN-X86-NEXT:    calll _tanhf128
 ; WIN-X86-NEXT:    addl $20, %esp
 ; WIN-X86-NEXT:    movl (%esp), %eax
 ; WIN-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx



More information about the llvm-commits mailing list