[clang] 7faf62a - [Clang] Add more fp128 math library function builtins

Qiu Chaofan via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 01:59:12 PST 2020


Author: Qiu Chaofan
Date: 2020-11-04T17:58:42+08:00
New Revision: 7faf62a80bfc3a9dfe34133681fcc31f8e8d658b

URL: https://github.com/llvm/llvm-project/commit/7faf62a80bfc3a9dfe34133681fcc31f8e8d658b
DIFF: https://github.com/llvm/llvm-project/commit/7faf62a80bfc3a9dfe34133681fcc31f8e8d658b.diff

LOG: [Clang] Add more fp128 math library function builtins

Since glibc has supported math library functions conforming IEEE 128-bit
floating point types on some platform (like ppc64le), we can fix clang's
math builtins missing this type.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D90593

Added: 
    

Modified: 
    clang/include/clang/Basic/Builtins.def
    clang/lib/CodeGen/CGBuiltin.cpp
    clang/test/CodeGen/constrained-math-builtins.c
    clang/test/CodeGen/math-builtins.c

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def
index 45ea7d9a3551..ab1b5866c8a7 100644
--- a/clang/include/clang/Basic/Builtins.def
+++ b/clang/include/clang/Basic/Builtins.def
@@ -115,6 +115,7 @@
 BUILTIN(__builtin_atan2 , "ddd"  , "Fne")
 BUILTIN(__builtin_atan2f, "fff"  , "Fne")
 BUILTIN(__builtin_atan2l, "LdLdLd", "Fne")
+BUILTIN(__builtin_atan2f128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_abs  , "ii"  , "ncF")
 BUILTIN(__builtin_copysign, "ddd", "ncF")
 BUILTIN(__builtin_copysignf, "fff", "ncF")
@@ -130,9 +131,11 @@ BUILTIN(__builtin_fmod , "ddd"  , "Fne")
 BUILTIN(__builtin_fmodf, "fff"  , "Fne")
 BUILTIN(__builtin_fmodf16, "hhh"  , "Fne")
 BUILTIN(__builtin_fmodl, "LdLdLd", "Fne")
+BUILTIN(__builtin_fmodf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_frexp , "ddi*"  , "Fn")
 BUILTIN(__builtin_frexpf, "ffi*"  , "Fn")
 BUILTIN(__builtin_frexpl, "LdLdi*", "Fn")
+BUILTIN(__builtin_frexpf128, "LLdLLdi*", "Fn")
 BUILTIN(__builtin_huge_val, "d", "nc")
 BUILTIN(__builtin_huge_valf, "f", "nc")
 BUILTIN(__builtin_huge_vall, "Ld", "nc")
@@ -146,9 +149,11 @@ BUILTIN(__builtin_llabs, "LLiLLi", "Fnc")
 BUILTIN(__builtin_ldexp , "ddi"  , "Fne")
 BUILTIN(__builtin_ldexpf, "ffi"  , "Fne")
 BUILTIN(__builtin_ldexpl, "LdLdi", "Fne")
+BUILTIN(__builtin_ldexpf128, "LLdLLdi", "Fne")
 BUILTIN(__builtin_modf , "ddd*"  , "Fn")
 BUILTIN(__builtin_modff, "fff*"  , "Fn")
 BUILTIN(__builtin_modfl, "LdLdLd*", "Fn")
+BUILTIN(__builtin_modff128, "LLdLLdLLd*", "Fn")
 BUILTIN(__builtin_nan,  "dcC*" , "FnU")
 BUILTIN(__builtin_nanf, "fcC*" , "FnU")
 BUILTIN(__builtin_nanl, "LdcC*", "FnU")
@@ -164,167 +169,216 @@ BUILTIN(__builtin_pow , "ddd"  , "Fne")
 BUILTIN(__builtin_powf, "fff"  , "Fne")
 BUILTIN(__builtin_powf16, "hhh"  , "Fne")
 BUILTIN(__builtin_powl, "LdLdLd", "Fne")
+BUILTIN(__builtin_powf128, "LLdLLdLLd", "Fne")
 
 // Standard unary libc/libm functions with double/float/long double variants:
 BUILTIN(__builtin_acos , "dd"  , "Fne")
 BUILTIN(__builtin_acosf, "ff"  , "Fne")
 BUILTIN(__builtin_acosl, "LdLd", "Fne")
+BUILTIN(__builtin_acosf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_acosh , "dd"  , "Fne")
 BUILTIN(__builtin_acoshf, "ff"  , "Fne")
 BUILTIN(__builtin_acoshl, "LdLd", "Fne")
+BUILTIN(__builtin_acoshf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_asin , "dd"  , "Fne")
 BUILTIN(__builtin_asinf, "ff"  , "Fne")
 BUILTIN(__builtin_asinl, "LdLd", "Fne")
+BUILTIN(__builtin_asinf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_asinh , "dd"  , "Fne")
 BUILTIN(__builtin_asinhf, "ff"  , "Fne")
 BUILTIN(__builtin_asinhl, "LdLd", "Fne")
+BUILTIN(__builtin_asinhf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_atan , "dd"  , "Fne")
 BUILTIN(__builtin_atanf, "ff"  , "Fne")
 BUILTIN(__builtin_atanl, "LdLd", "Fne")
+BUILTIN(__builtin_atanf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_atanh , "dd", "Fne")
 BUILTIN(__builtin_atanhf, "ff", "Fne")
 BUILTIN(__builtin_atanhl, "LdLd", "Fne")
+BUILTIN(__builtin_atanhf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_cbrt , "dd", "Fnc")
 BUILTIN(__builtin_cbrtf, "ff", "Fnc")
 BUILTIN(__builtin_cbrtl, "LdLd", "Fnc")
+BUILTIN(__builtin_cbrtf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_ceil , "dd"  , "Fnc")
 BUILTIN(__builtin_ceilf, "ff"  , "Fnc")
 BUILTIN(__builtin_ceilf16, "hh"  , "Fnc")
 BUILTIN(__builtin_ceill, "LdLd", "Fnc")
+BUILTIN(__builtin_ceilf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_cos , "dd"  , "Fne")
 BUILTIN(__builtin_cosf, "ff"  , "Fne")
 BUILTIN(__builtin_cosf16, "hh"  , "Fne")
 BUILTIN(__builtin_cosh , "dd"  , "Fne")
 BUILTIN(__builtin_coshf, "ff"  , "Fne")
 BUILTIN(__builtin_coshl, "LdLd", "Fne")
+BUILTIN(__builtin_coshf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_cosl, "LdLd", "Fne")
+BUILTIN(__builtin_cosf128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_erf , "dd", "Fne")
 BUILTIN(__builtin_erff, "ff", "Fne")
 BUILTIN(__builtin_erfl, "LdLd", "Fne")
+BUILTIN(__builtin_erff128, "LLdLLd", "Fne")
 BUILTIN(__builtin_erfc , "dd", "Fne")
 BUILTIN(__builtin_erfcf, "ff", "Fne")
 BUILTIN(__builtin_erfcl, "LdLd", "Fne")
+BUILTIN(__builtin_erfcf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_exp , "dd"  , "Fne")
 BUILTIN(__builtin_expf, "ff"  , "Fne")
 BUILTIN(__builtin_expf16, "hh"  , "Fne")
 BUILTIN(__builtin_expl, "LdLd", "Fne")
+BUILTIN(__builtin_expf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_exp2 , "dd"  , "Fne")
 BUILTIN(__builtin_exp2f, "ff"  , "Fne")
 BUILTIN(__builtin_exp2f16, "hh"  , "Fne")
 BUILTIN(__builtin_exp2l, "LdLd", "Fne")
+BUILTIN(__builtin_exp2f128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_expm1 , "dd", "Fne")
 BUILTIN(__builtin_expm1f, "ff", "Fne")
 BUILTIN(__builtin_expm1l, "LdLd", "Fne")
+BUILTIN(__builtin_expm1f128, "LLdLLd", "Fne")
 BUILTIN(__builtin_fdim, "ddd", "Fne")
 BUILTIN(__builtin_fdimf, "fff", "Fne")
 BUILTIN(__builtin_fdiml, "LdLdLd", "Fne")
+BUILTIN(__builtin_fdimf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_floor , "dd"  , "Fnc")
 BUILTIN(__builtin_floorf, "ff"  , "Fnc")
 BUILTIN(__builtin_floorf16, "hh"  , "Fnc")
 BUILTIN(__builtin_floorl, "LdLd", "Fnc")
+BUILTIN(__builtin_floorf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_fma, "dddd", "Fne")
 BUILTIN(__builtin_fmaf, "ffff", "Fne")
 BUILTIN(__builtin_fmaf16, "hhhh", "Fne")
 BUILTIN(__builtin_fmal, "LdLdLdLd", "Fne")
+BUILTIN(__builtin_fmaf128, "LLdLLdLLdLLd", "Fne")
 BUILTIN(__builtin_fmax, "ddd", "Fnc")
 BUILTIN(__builtin_fmaxf, "fff", "Fnc")
 BUILTIN(__builtin_fmaxf16, "hhh", "Fnc")
 BUILTIN(__builtin_fmaxl, "LdLdLd", "Fnc")
+BUILTIN(__builtin_fmaxf128, "LLdLLdLLd", "Fnc")
 BUILTIN(__builtin_fmin, "ddd", "Fnc")
 BUILTIN(__builtin_fminf, "fff", "Fnc")
 BUILTIN(__builtin_fminf16, "hhh", "Fnc")
 BUILTIN(__builtin_fminl, "LdLdLd", "Fnc")
+BUILTIN(__builtin_fminf128, "LLdLLdLLd", "Fnc")
 BUILTIN(__builtin_hypot , "ddd"  , "Fne")
 BUILTIN(__builtin_hypotf, "fff"  , "Fne")
 BUILTIN(__builtin_hypotl, "LdLdLd", "Fne")
+BUILTIN(__builtin_hypotf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_ilogb , "id", "Fne")
 BUILTIN(__builtin_ilogbf, "if", "Fne")
 BUILTIN(__builtin_ilogbl, "iLd", "Fne")
+BUILTIN(__builtin_ilogbf128, "iLLd", "Fne")
 BUILTIN(__builtin_lgamma , "dd", "Fn")
 BUILTIN(__builtin_lgammaf, "ff", "Fn")
 BUILTIN(__builtin_lgammal, "LdLd", "Fn")
+BUILTIN(__builtin_lgammaf128, "LLdLLd", "Fn")
 BUILTIN(__builtin_llrint, "LLid", "Fne")
 BUILTIN(__builtin_llrintf, "LLif", "Fne")
 BUILTIN(__builtin_llrintl, "LLiLd", "Fne")
+BUILTIN(__builtin_llrintf128, "LLiLLd", "Fne")
 BUILTIN(__builtin_llround , "LLid", "Fne")
 BUILTIN(__builtin_llroundf, "LLif", "Fne")
 BUILTIN(__builtin_llroundl, "LLiLd", "Fne")
+BUILTIN(__builtin_llroundf128, "LLiLLd", "Fne")
 BUILTIN(__builtin_log , "dd"  , "Fne")
 BUILTIN(__builtin_log10 , "dd"  , "Fne")
 BUILTIN(__builtin_log10f, "ff"  , "Fne")
 BUILTIN(__builtin_log10f16, "hh"  , "Fne")
 BUILTIN(__builtin_log10l, "LdLd", "Fne")
+BUILTIN(__builtin_log10f128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_log1p , "dd"  , "Fne")
 BUILTIN(__builtin_log1pf, "ff"  , "Fne")
 BUILTIN(__builtin_log1pl, "LdLd", "Fne")
+BUILTIN(__builtin_log1pf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_log2, "dd"  , "Fne")
 BUILTIN(__builtin_log2f, "ff"  , "Fne")
 BUILTIN(__builtin_log2f16, "hh"  , "Fne")
 BUILTIN(__builtin_log2l, "LdLd"  , "Fne")
+BUILTIN(__builtin_log2f128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_logb , "dd", "Fne")
 BUILTIN(__builtin_logbf, "ff", "Fne")
 BUILTIN(__builtin_logbl, "LdLd", "Fne")
+BUILTIN(__builtin_logbf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_logf, "ff"  , "Fne")
 BUILTIN(__builtin_logf16, "hh"  , "Fne")
 BUILTIN(__builtin_logl, "LdLd", "Fne")
+BUILTIN(__builtin_logf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_lrint , "Lid", "Fne")
 BUILTIN(__builtin_lrintf, "Lif", "Fne")
 BUILTIN(__builtin_lrintl, "LiLd", "Fne")
+BUILTIN(__builtin_lrintf128, "LiLLd", "Fne")
 BUILTIN(__builtin_lround , "Lid", "Fne")
 BUILTIN(__builtin_lroundf, "Lif", "Fne")
 BUILTIN(__builtin_lroundl, "LiLd", "Fne")
+BUILTIN(__builtin_lroundf128, "LiLLd", "Fne")
 BUILTIN(__builtin_nearbyint , "dd", "Fnc")
 BUILTIN(__builtin_nearbyintf, "ff", "Fnc")
 BUILTIN(__builtin_nearbyintl, "LdLd", "Fnc")
+BUILTIN(__builtin_nearbyintf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_nextafter , "ddd", "Fne")
 BUILTIN(__builtin_nextafterf, "fff", "Fne")
 BUILTIN(__builtin_nextafterl, "LdLdLd", "Fne")
+BUILTIN(__builtin_nextafterf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_nexttoward , "ddLd", "Fne")
 BUILTIN(__builtin_nexttowardf, "ffLd", "Fne")
 BUILTIN(__builtin_nexttowardl, "LdLdLd", "Fne")
+BUILTIN(__builtin_nexttowardf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_remainder , "ddd", "Fne")
 BUILTIN(__builtin_remainderf, "fff", "Fne")
 BUILTIN(__builtin_remainderl, "LdLdLd", "Fne")
+BUILTIN(__builtin_remainderf128, "LLdLLdLLd", "Fne")
 BUILTIN(__builtin_remquo , "dddi*", "Fn")
 BUILTIN(__builtin_remquof, "fffi*", "Fn")
 BUILTIN(__builtin_remquol, "LdLdLdi*", "Fn")
+BUILTIN(__builtin_remquof128, "LLdLLdLLdi*", "Fn")
 BUILTIN(__builtin_rint , "dd", "Fnc")
 BUILTIN(__builtin_rintf, "ff", "Fnc")
 BUILTIN(__builtin_rintf16, "hh", "Fnc")
 BUILTIN(__builtin_rintl, "LdLd", "Fnc")
+BUILTIN(__builtin_rintf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_round, "dd"  , "Fnc")
 BUILTIN(__builtin_roundf, "ff"  , "Fnc")
 BUILTIN(__builtin_roundf16, "hh"  , "Fnc")
 BUILTIN(__builtin_roundl, "LdLd"  , "Fnc")
+BUILTIN(__builtin_roundf128, "LLdLLd"  , "Fnc")
 BUILTIN(__builtin_scalbln , "ddLi", "Fne")
 BUILTIN(__builtin_scalblnf, "ffLi", "Fne")
 BUILTIN(__builtin_scalblnl, "LdLdLi", "Fne")
+BUILTIN(__builtin_scalblnf128, "LLdLLdLi", "Fne")
 BUILTIN(__builtin_scalbn , "ddi", "Fne")
 BUILTIN(__builtin_scalbnf, "ffi", "Fne")
 BUILTIN(__builtin_scalbnl, "LdLdi", "Fne")
+BUILTIN(__builtin_scalbnf128, "LLdLLdi", "Fne")
 BUILTIN(__builtin_sin , "dd"  , "Fne")
 BUILTIN(__builtin_sinf, "ff"  , "Fne")
 BUILTIN(__builtin_sinf16, "hh"  , "Fne")
 BUILTIN(__builtin_sinh , "dd"  , "Fne")
 BUILTIN(__builtin_sinhf, "ff"  , "Fne")
 BUILTIN(__builtin_sinhl, "LdLd", "Fne")
+BUILTIN(__builtin_sinhf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_sinl, "LdLd", "Fne")
+BUILTIN(__builtin_sinf128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_sqrt , "dd"  , "Fne")
 BUILTIN(__builtin_sqrtf, "ff"  , "Fne")
 BUILTIN(__builtin_sqrtf16, "hh"  , "Fne")
 BUILTIN(__builtin_sqrtl, "LdLd", "Fne")
+BUILTIN(__builtin_sqrtf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_tan , "dd"  , "Fne")
 BUILTIN(__builtin_tanf, "ff"  , "Fne")
 BUILTIN(__builtin_tanh , "dd"  , "Fne")
 BUILTIN(__builtin_tanhf, "ff"  , "Fne")
 BUILTIN(__builtin_tanhl, "LdLd", "Fne")
+BUILTIN(__builtin_tanhf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_tanl, "LdLd", "Fne")
+BUILTIN(__builtin_tanf128, "LLdLLd"  , "Fne")
 BUILTIN(__builtin_tgamma , "dd", "Fne")
 BUILTIN(__builtin_tgammaf, "ff", "Fne")
 BUILTIN(__builtin_tgammal, "LdLd", "Fne")
+BUILTIN(__builtin_tgammaf128, "LLdLLd", "Fne")
 BUILTIN(__builtin_trunc , "dd", "Fnc")
 BUILTIN(__builtin_truncf, "ff", "Fnc")
 BUILTIN(__builtin_truncl, "LdLd", "Fnc")
+BUILTIN(__builtin_truncf128, "LLdLLd", "Fnc")
 BUILTIN(__builtin_truncf16, "hh", "Fnc")
 
 // Access to floating point environment

diff  --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 30c04bce6316..0b8259221d8f 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1684,6 +1684,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_ceilf:
     case Builtin::BI__builtin_ceilf16:
     case Builtin::BI__builtin_ceill:
+    case Builtin::BI__builtin_ceilf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::ceil,
                                    Intrinsic::experimental_constrained_ceil));
@@ -1705,6 +1706,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_cosf:
     case Builtin::BI__builtin_cosf16:
     case Builtin::BI__builtin_cosl:
+    case Builtin::BI__builtin_cosf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::cos,
                                    Intrinsic::experimental_constrained_cos));
@@ -1716,6 +1718,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_expf:
     case Builtin::BI__builtin_expf16:
     case Builtin::BI__builtin_expl:
+    case Builtin::BI__builtin_expf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::exp,
                                    Intrinsic::experimental_constrained_exp));
@@ -1727,6 +1730,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_exp2f:
     case Builtin::BI__builtin_exp2f16:
     case Builtin::BI__builtin_exp2l:
+    case Builtin::BI__builtin_exp2f128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::exp2,
                                    Intrinsic::experimental_constrained_exp2));
@@ -1748,6 +1752,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_floorf:
     case Builtin::BI__builtin_floorf16:
     case Builtin::BI__builtin_floorl:
+    case Builtin::BI__builtin_floorf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::floor,
                                    Intrinsic::experimental_constrained_floor));
@@ -1759,6 +1764,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_fmaf:
     case Builtin::BI__builtin_fmaf16:
     case Builtin::BI__builtin_fmal:
+    case Builtin::BI__builtin_fmaf128:
       return RValue::get(emitTernaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::fma,
                                    Intrinsic::experimental_constrained_fma));
@@ -1770,6 +1776,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_fmaxf:
     case Builtin::BI__builtin_fmaxf16:
     case Builtin::BI__builtin_fmaxl:
+    case Builtin::BI__builtin_fmaxf128:
       return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::maxnum,
                                    Intrinsic::experimental_constrained_maxnum));
@@ -1781,6 +1788,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_fminf:
     case Builtin::BI__builtin_fminf16:
     case Builtin::BI__builtin_fminl:
+    case Builtin::BI__builtin_fminf128:
       return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::minnum,
                                    Intrinsic::experimental_constrained_minnum));
@@ -1793,7 +1801,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_fmod:
     case Builtin::BI__builtin_fmodf:
     case Builtin::BI__builtin_fmodf16:
-    case Builtin::BI__builtin_fmodl: {
+    case Builtin::BI__builtin_fmodl:
+    case Builtin::BI__builtin_fmodf128: {
       Value *Arg1 = EmitScalarExpr(E->getArg(0));
       Value *Arg2 = EmitScalarExpr(E->getArg(1));
       return RValue::get(Builder.CreateFRem(Arg1, Arg2, "fmod"));
@@ -1806,6 +1815,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_logf:
     case Builtin::BI__builtin_logf16:
     case Builtin::BI__builtin_logl:
+    case Builtin::BI__builtin_logf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::log,
                                    Intrinsic::experimental_constrained_log));
@@ -1817,6 +1827,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_log10f:
     case Builtin::BI__builtin_log10f16:
     case Builtin::BI__builtin_log10l:
+    case Builtin::BI__builtin_log10f128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::log10,
                                    Intrinsic::experimental_constrained_log10));
@@ -1828,6 +1839,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_log2f:
     case Builtin::BI__builtin_log2f16:
     case Builtin::BI__builtin_log2l:
+    case Builtin::BI__builtin_log2f128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::log2,
                                    Intrinsic::experimental_constrained_log2));
@@ -1838,6 +1850,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_nearbyint:
     case Builtin::BI__builtin_nearbyintf:
     case Builtin::BI__builtin_nearbyintl:
+    case Builtin::BI__builtin_nearbyintf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                 Intrinsic::nearbyint,
                                 Intrinsic::experimental_constrained_nearbyint));
@@ -1849,6 +1862,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_powf:
     case Builtin::BI__builtin_powf16:
     case Builtin::BI__builtin_powl:
+    case Builtin::BI__builtin_powf128:
       return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::pow,
                                    Intrinsic::experimental_constrained_pow));
@@ -1860,6 +1874,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_rintf:
     case Builtin::BI__builtin_rintf16:
     case Builtin::BI__builtin_rintl:
+    case Builtin::BI__builtin_rintf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::rint,
                                    Intrinsic::experimental_constrained_rint));
@@ -1871,6 +1886,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_roundf:
     case Builtin::BI__builtin_roundf16:
     case Builtin::BI__builtin_roundl:
+    case Builtin::BI__builtin_roundf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::round,
                                    Intrinsic::experimental_constrained_round));
@@ -1882,6 +1898,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_sinf:
     case Builtin::BI__builtin_sinf16:
     case Builtin::BI__builtin_sinl:
+    case Builtin::BI__builtin_sinf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::sin,
                                    Intrinsic::experimental_constrained_sin));
@@ -1893,6 +1910,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_sqrtf:
     case Builtin::BI__builtin_sqrtf16:
     case Builtin::BI__builtin_sqrtl:
+    case Builtin::BI__builtin_sqrtf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::sqrt,
                                    Intrinsic::experimental_constrained_sqrt));
@@ -1904,6 +1922,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_truncf:
     case Builtin::BI__builtin_truncf16:
     case Builtin::BI__builtin_truncl:
+    case Builtin::BI__builtin_truncf128:
       return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(*this, E,
                                    Intrinsic::trunc,
                                    Intrinsic::experimental_constrained_trunc));
@@ -1914,6 +1933,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_lround:
     case Builtin::BI__builtin_lroundf:
     case Builtin::BI__builtin_lroundl:
+    case Builtin::BI__builtin_lroundf128:
       return RValue::get(emitMaybeConstrainedFPToIntRoundBuiltin(
           *this, E, Intrinsic::lround,
           Intrinsic::experimental_constrained_lround));
@@ -1924,6 +1944,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_llround:
     case Builtin::BI__builtin_llroundf:
     case Builtin::BI__builtin_llroundl:
+    case Builtin::BI__builtin_llroundf128:
       return RValue::get(emitMaybeConstrainedFPToIntRoundBuiltin(
           *this, E, Intrinsic::llround,
           Intrinsic::experimental_constrained_llround));
@@ -1934,6 +1955,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_lrint:
     case Builtin::BI__builtin_lrintf:
     case Builtin::BI__builtin_lrintl:
+    case Builtin::BI__builtin_lrintf128:
       return RValue::get(emitMaybeConstrainedFPToIntRoundBuiltin(
           *this, E, Intrinsic::lrint,
           Intrinsic::experimental_constrained_lrint));
@@ -1944,6 +1966,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_llrint:
     case Builtin::BI__builtin_llrintf:
     case Builtin::BI__builtin_llrintl:
+    case Builtin::BI__builtin_llrintf128:
       return RValue::get(emitMaybeConstrainedFPToIntRoundBuiltin(
           *this, E, Intrinsic::llrint,
           Intrinsic::experimental_constrained_llrint));

diff  --git a/clang/test/CodeGen/constrained-math-builtins.c b/clang/test/CodeGen/constrained-math-builtins.c
index a2feae903d30..5c7da2d7444c 100644
--- a/clang/test/CodeGen/constrained-math-builtins.c
+++ b/clang/test/CodeGen/constrained-math-builtins.c
@@ -3,17 +3,19 @@
 // Test codegen of constrained math builtins.
 
 void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
-  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f);
+  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f); f = __builtin_fmodf128(f,f);
 
 // CHECK: declare double @llvm.experimental.constrained.frem.f64(double, double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.frem.f32(float, float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.frem.f80(x86_fp80, x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.frem.f128(fp128, fp128, metadata, metadata)
 
-  __builtin_pow(f,f);        __builtin_powf(f,f);       __builtin_powl(f,f);
+  __builtin_pow(f,f);        __builtin_powf(f,f);       __builtin_powl(f,f); __builtin_powf128(f,f);
 
 // CHECK: declare double @llvm.experimental.constrained.pow.f64(double, double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.pow.f32(float, float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.pow.f80(x86_fp80, x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.pow.f128(fp128, fp128, metadata, metadata)
 
   __builtin_powi(f,f);        __builtin_powif(f,f);       __builtin_powil(f,f);
 
@@ -21,131 +23,152 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // CHECK: declare float @llvm.experimental.constrained.powi.f32(float, i32, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.powi.f80(x86_fp80, i32, metadata, metadata)
 
-  __builtin_ceil(f);       __builtin_ceilf(f);      __builtin_ceill(f);
+  __builtin_ceil(f);       __builtin_ceilf(f);      __builtin_ceill(f); __builtin_ceilf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.ceil.f64(double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.ceil.f32(float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.ceil.f80(x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.ceil.f128(fp128, metadata)
 
-  __builtin_cos(f);        __builtin_cosf(f);       __builtin_cosl(f); 
+  __builtin_cos(f);        __builtin_cosf(f);       __builtin_cosl(f); __builtin_cosf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.cos.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.cos.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.cos.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.cos.f128(fp128, metadata, metadata)
 
-  __builtin_exp(f);        __builtin_expf(f);       __builtin_expl(f);
+  __builtin_exp(f);        __builtin_expf(f);       __builtin_expl(f); __builtin_expf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.exp.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.exp.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.exp.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.exp.f128(fp128, metadata, metadata)
 
-  __builtin_exp2(f);       __builtin_exp2f(f);      __builtin_exp2l(f); 
+  __builtin_exp2(f);       __builtin_exp2f(f);      __builtin_exp2l(f); __builtin_exp2f128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.exp2.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.exp2.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.exp2.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.exp2.f128(fp128, metadata, metadata)
 
-  __builtin_floor(f);      __builtin_floorf(f);     __builtin_floorl(f);
+  __builtin_floor(f);      __builtin_floorf(f);     __builtin_floorl(f); __builtin_floorf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.floor.f64(double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.floor.f32(float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.floor.f80(x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.floor.f128(fp128, metadata)
 
-  __builtin_fma(f,f,f);        __builtin_fmaf(f,f,f);       __builtin_fmal(f,f,f);
+  __builtin_fma(f,f,f);        __builtin_fmaf(f,f,f);       __builtin_fmal(f,f,f); __builtin_fmaf128(f,f,f);
 
 // CHECK: declare double @llvm.experimental.constrained.fma.f64(double, double, double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.fma.f32(float, float, float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.fma.f80(x86_fp80, x86_fp80, x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.fma.f128(fp128, fp128, fp128, metadata, metadata)
 
-  __builtin_fmax(f,f);       __builtin_fmaxf(f,f);      __builtin_fmaxl(f,f);
+  __builtin_fmax(f,f);       __builtin_fmaxf(f,f);      __builtin_fmaxl(f,f); __builtin_fmaxf128(f,f);
 
 // CHECK: declare double @llvm.experimental.constrained.maxnum.f64(double, double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.maxnum.f32(float, float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.maxnum.f80(x86_fp80, x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.maxnum.f128(fp128, fp128, metadata)
 
-  __builtin_fmin(f,f);       __builtin_fminf(f,f);      __builtin_fminl(f,f);
+  __builtin_fmin(f,f);       __builtin_fminf(f,f);      __builtin_fminl(f,f); __builtin_fminf128(f,f);
 
 // CHECK: declare double @llvm.experimental.constrained.minnum.f64(double, double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.minnum.f32(float, float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.minnum.f80(x86_fp80, x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.minnum.f128(fp128, fp128, metadata)
 
-  __builtin_llrint(f);     __builtin_llrintf(f);    __builtin_llrintl(f);
+  __builtin_llrint(f);     __builtin_llrintf(f);    __builtin_llrintl(f); __builtin_llrintf128(f);
 
 // CHECK: declare i64 @llvm.experimental.constrained.llrint.i64.f64(double, metadata, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.llrint.i64.f32(float, metadata, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.llrint.i64.f80(x86_fp80, metadata, metadata)
+// CHECK: declare i64 @llvm.experimental.constrained.llrint.i64.f128(fp128, metadata, metadata)
 
-  __builtin_llround(f);    __builtin_llroundf(f);   __builtin_llroundl(f);
+  __builtin_llround(f);    __builtin_llroundf(f);   __builtin_llroundl(f); __builtin_llroundf128(f);
 
 // CHECK: declare i64 @llvm.experimental.constrained.llround.i64.f64(double, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.llround.i64.f32(float, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.llround.i64.f80(x86_fp80, metadata)
+// CHECK: declare i64 @llvm.experimental.constrained.llround.i64.f128(fp128, metadata)
 
-  __builtin_log(f);        __builtin_logf(f);       __builtin_logl(f);
+  __builtin_log(f);        __builtin_logf(f);       __builtin_logl(f); __builtin_logf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.log.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.log.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.log.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.log.f128(fp128, metadata, metadata)
 
-  __builtin_log10(f);      __builtin_log10f(f);     __builtin_log10l(f);
+  __builtin_log10(f);      __builtin_log10f(f);     __builtin_log10l(f); __builtin_log10f128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.log10.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.log10.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.log10.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.log10.f128(fp128, metadata, metadata)
 
-  __builtin_log2(f);       __builtin_log2f(f);      __builtin_log2l(f);
+  __builtin_log2(f);       __builtin_log2f(f);      __builtin_log2l(f); __builtin_log2f128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.log2.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.log2.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.log2.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.log2.f128(fp128, metadata, metadata)
 
-  __builtin_lrint(f);      __builtin_lrintf(f);     __builtin_lrintl(f);
+  __builtin_lrint(f);      __builtin_lrintf(f);     __builtin_lrintl(f); __builtin_lrintf128(f);
 
 // CHECK: declare i64 @llvm.experimental.constrained.lrint.i64.f64(double, metadata, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.lrint.i64.f32(float, metadata, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.lrint.i64.f80(x86_fp80, metadata, metadata)
+// CHECK: declare i64 @llvm.experimental.constrained.lrint.i64.f128(fp128, metadata, metadata)
 
-  __builtin_lround(f);     __builtin_lroundf(f);    __builtin_lroundl(f);
+  __builtin_lround(f);     __builtin_lroundf(f);    __builtin_lroundl(f); __builtin_lroundf128(f);
 
 // CHECK: declare i64 @llvm.experimental.constrained.lround.i64.f64(double, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.lround.i64.f32(float, metadata)
 // CHECK: declare i64 @llvm.experimental.constrained.lround.i64.f80(x86_fp80, metadata)
+// CHECK: declare i64 @llvm.experimental.constrained.lround.i64.f128(fp128, metadata)
 
-  __builtin_nearbyint(f);  __builtin_nearbyintf(f); __builtin_nearbyintl(f);
+  __builtin_nearbyint(f);  __builtin_nearbyintf(f); __builtin_nearbyintl(f); __builtin_nearbyintf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.nearbyint.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.nearbyint.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.nearbyint.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.nearbyint.f128(fp128, metadata, metadata)
 
-  __builtin_rint(f);       __builtin_rintf(f);      __builtin_rintl(f);
+  __builtin_rint(f);       __builtin_rintf(f);      __builtin_rintl(f); __builtin_rintf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.rint.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.rint.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.rint.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.rint.f128(fp128, metadata, metadata)
 
-  __builtin_round(f);      __builtin_roundf(f);     __builtin_roundl(f);
+  __builtin_round(f);      __builtin_roundf(f);     __builtin_roundl(f); __builtin_roundf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.round.f64(double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.round.f32(float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.round.f80(x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.round.f128(fp128, metadata)
 
-  __builtin_sin(f);        __builtin_sinf(f);       __builtin_sinl(f);
+  __builtin_sin(f);        __builtin_sinf(f);       __builtin_sinl(f); __builtin_sinf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.sin.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.sin.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.sin.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.sin.f128(fp128, metadata, metadata)
 
-  __builtin_sqrt(f);       __builtin_sqrtf(f);      __builtin_sqrtl(f); 
+  __builtin_sqrt(f);       __builtin_sqrtf(f);      __builtin_sqrtl(f); __builtin_sqrtf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.sqrt.f64(double, metadata, metadata)
 // CHECK: declare float @llvm.experimental.constrained.sqrt.f32(float, metadata, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.sqrt.f80(x86_fp80, metadata, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.sqrt.f128(fp128, metadata, metadata)
 
-  __builtin_trunc(f);      __builtin_truncf(f);     __builtin_truncl(f);
+  __builtin_trunc(f);      __builtin_truncf(f);     __builtin_truncl(f); __builtin_truncf128(f);
 
 // CHECK: declare double @llvm.experimental.constrained.trunc.f64(double, metadata)
 // CHECK: declare float @llvm.experimental.constrained.trunc.f32(float, metadata)
 // CHECK: declare x86_fp80 @llvm.experimental.constrained.trunc.f80(x86_fp80, metadata)
+// CHECK: declare fp128 @llvm.experimental.constrained.trunc.f128(fp128, metadata)
 };
 
 #pragma STDC FP_CONTRACT ON

diff  --git a/clang/test/CodeGen/math-builtins.c b/clang/test/CodeGen/math-builtins.c
index 8aadd050ee89..ac2a7595e1c9 100644
--- a/clang/test/CodeGen/math-builtins.c
+++ b/clang/test/CodeGen/math-builtins.c
@@ -7,23 +7,27 @@
 // Test attributes and codegen of math builtins.
 
 void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
-  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f);
+  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f);  f = __builtin_fmodf128(f,f);
 
 // NO__ERRNO: frem double
 // NO__ERRNO: frem float
 // NO__ERRNO: frem x86_fp80
+// NO__ERRNO: frem fp128
 // HAS_ERRNO: declare double @fmod(double, double) [[NOT_READNONE:#[0-9]+]]
 // HAS_ERRNO: declare float @fmodf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @fmodf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_atan2(f,f);    __builtin_atan2f(f,f) ;  __builtin_atan2l(f, f);
+  __builtin_atan2(f,f);    __builtin_atan2f(f,f) ;  __builtin_atan2l(f, f); __builtin_atan2f128(f,f);
 
 // NO__ERRNO: declare double @atan2(double, double) [[READNONE:#[0-9]+]]
 // NO__ERRNO: declare float @atan2f(float, float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @atan2f128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @atan2(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @atan2f(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @atan2f128(fp128, fp128) [[NOT_READNONE]]
 
   __builtin_copysign(f,f); __builtin_copysignf(f,f); __builtin_copysignl(f,f); __builtin_copysignf128(f,f);
 
@@ -47,14 +51,16 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // HAS_ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare fp128 @llvm.fabs.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_frexp(f,i);    __builtin_frexpf(f,i);   __builtin_frexpl(f,i);
+  __builtin_frexp(f,i);    __builtin_frexpf(f,i);   __builtin_frexpl(f,i); __builtin_frexpf128(f,i);
 
 // NO__ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE:#[0-9]+]]
 // NO__ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
 // NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
+// NO__ERRNO: declare fp128 @frexpf128(fp128, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @frexpf128(fp128, i32*) [[NOT_READNONE]]
 
   __builtin_huge_val();    __builtin_huge_valf();   __builtin_huge_vall(); __builtin_huge_valf128();
 
@@ -70,23 +76,27 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // HAS_ERRNO-NOT: .inf
 // HAS_ERRNO-NOT: @inf
 
-  __builtin_ldexp(f,f);    __builtin_ldexpf(f,f);   __builtin_ldexpl(f,f);  
+  __builtin_ldexp(f,f);    __builtin_ldexpf(f,f);   __builtin_ldexpl(f,f);  __builtin_ldexpf128(f,f);
 
 // NO__ERRNO: declare double @ldexp(double, i32) [[READNONE]]
 // NO__ERRNO: declare float @ldexpf(float, i32) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[READNONE]]
+// NO__ERRNO: declare fp128 @ldexpf128(fp128, i32) [[READNONE]]
 // HAS_ERRNO: declare double @ldexp(double, i32) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @ldexpf(float, i32) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @ldexpf128(fp128, i32) [[NOT_READNONE]]
 
-  __builtin_modf(f,d);       __builtin_modff(f,fp);      __builtin_modfl(f,l); 
+  __builtin_modf(f,d);       __builtin_modff(f,fp);      __builtin_modfl(f,l); __builtin_modff128(f,l);
 
 // NO__ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
 // NO__ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
 // NO__ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
+// NO__ERRNO: declare fp128 @modff128(fp128, fp128*) [[NOT_READNONE]]
 // HAS_ERRNO: declare double @modf(double, double*) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @modff(float, float*) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80, x86_fp80*) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @modff128(fp128, fp128*) [[NOT_READNONE]]
 
   __builtin_nan(c);        __builtin_nanf(c);       __builtin_nanl(c); __builtin_nanf128(c);
 
@@ -110,14 +120,16 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // HAS_ERRNO: declare x86_fp80 @nansl(i8*) [[PURE]]
 // HAS_ERRNO: declare fp128 @nansf128(i8*) [[PURE]]
 
-  __builtin_pow(f,f);        __builtin_powf(f,f);       __builtin_powl(f,f);
+  __builtin_pow(f,f);        __builtin_powf(f,f);       __builtin_powl(f,f); __builtin_powf128(f,f);
 
 // NO__ERRNO: declare double @llvm.pow.f64(double, double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.pow.f32(float, float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.pow.f128(fp128, fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @pow(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @powf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @powf128(fp128, fp128) [[NOT_READNONE]]
 
   __builtin_powi(f,f);        __builtin_powif(f,f);       __builtin_powil(f,f);
 
@@ -129,167 +141,203 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // HAS_ERRNO: declare x86_fp80 @llvm.powi.f80(x86_fp80, i32) [[READNONE_INTRINSIC]]
 
   /* math */
-  __builtin_acos(f);       __builtin_acosf(f);      __builtin_acosl(f);
+  __builtin_acos(f);       __builtin_acosf(f);      __builtin_acosl(f); __builtin_acosf128(f);
 
 // NO__ERRNO: declare double @acos(double) [[READNONE]]
 // NO__ERRNO: declare float @acosf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @acosl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @acosf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @acos(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @acosf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @acosf128(fp128) [[NOT_READNONE]]
 
-  __builtin_acosh(f);      __builtin_acoshf(f);     __builtin_acoshl(f);  
+  __builtin_acosh(f);      __builtin_acoshf(f);     __builtin_acoshl(f);  __builtin_acoshf128(f);
 
 // NO__ERRNO: declare double @acosh(double) [[READNONE]]
 // NO__ERRNO: declare float @acoshf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @acoshf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @acosh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @acoshf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @acoshf128(fp128) [[NOT_READNONE]]
 
-  __builtin_asin(f);       __builtin_asinf(f);      __builtin_asinl(f); 
+  __builtin_asin(f);       __builtin_asinf(f);      __builtin_asinl(f); __builtin_asinf128(f);
 
 // NO__ERRNO: declare double @asin(double) [[READNONE]]
 // NO__ERRNO: declare float @asinf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @asinl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @asinf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @asin(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @asinf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @asinf128(fp128) [[NOT_READNONE]]
 
-  __builtin_asinh(f);      __builtin_asinhf(f);     __builtin_asinhl(f);
+  __builtin_asinh(f);      __builtin_asinhf(f);     __builtin_asinhl(f); __builtin_asinhf128(f);
 
 // NO__ERRNO: declare double @asinh(double) [[READNONE]]
 // NO__ERRNO: declare float @asinhf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @asinhf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @asinh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @asinhf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @asinhf128(fp128) [[NOT_READNONE]]
 
-  __builtin_atan(f);       __builtin_atanf(f);      __builtin_atanl(f);
+  __builtin_atan(f);       __builtin_atanf(f);      __builtin_atanl(f); __builtin_atanf128(f);
 
 // NO__ERRNO: declare double @atan(double) [[READNONE]]
 // NO__ERRNO: declare float @atanf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @atanl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @atanf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @atan(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @atanf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @atanf128(fp128) [[NOT_READNONE]]
 
-  __builtin_atanh(f);      __builtin_atanhf(f);     __builtin_atanhl(f); 
+  __builtin_atanh(f);      __builtin_atanhf(f);     __builtin_atanhl(f); __builtin_atanhf128(f);
 
 // NO__ERRNO: declare double @atanh(double) [[READNONE]]
 // NO__ERRNO: declare float @atanhf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @atanhf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @atanh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @atanhf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @atanhf128(fp128) [[NOT_READNONE]]
 
-  __builtin_cbrt(f);       __builtin_cbrtf(f);      __builtin_cbrtl(f);
+  __builtin_cbrt(f);       __builtin_cbrtf(f);      __builtin_cbrtl(f); __builtin_cbrtf128(f);
 
 // NO__ERRNO: declare double @cbrt(double) [[READNONE]]
 // NO__ERRNO: declare float @cbrtf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @cbrtf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @cbrt(double) [[READNONE:#[0-9]+]]
 // HAS_ERRNO: declare float @cbrtf(float) [[READNONE]]
 // HAS_ERRNO: declare x86_fp80 @cbrtl(x86_fp80) [[READNONE]]
+// HAS_ERRNO: declare fp128 @cbrtf128(fp128) [[READNONE]]
 
-  __builtin_ceil(f);       __builtin_ceilf(f);      __builtin_ceill(f);
+  __builtin_ceil(f);       __builtin_ceilf(f);      __builtin_ceill(f); __builtin_ceilf128(f);
 
 // NO__ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.ceil.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.ceil.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_cos(f);        __builtin_cosf(f);       __builtin_cosl(f); 
+  __builtin_cos(f);        __builtin_cosf(f);       __builtin_cosl(f); __builtin_cosf128(f);
 
 // NO__ERRNO: declare double @llvm.cos.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.cos.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.cos.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.cos.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @cos(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @cosf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @cosf128(fp128) [[NOT_READNONE]]
 
-  __builtin_cosh(f);       __builtin_coshf(f);      __builtin_coshl(f);
+  __builtin_cosh(f);       __builtin_coshf(f);      __builtin_coshl(f); __builtin_coshf128(f);
 
 // NO__ERRNO: declare double @cosh(double) [[READNONE]]
 // NO__ERRNO: declare float @coshf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @coshl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @coshf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @cosh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @coshf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @coshf128(fp128) [[NOT_READNONE]]
 
-  __builtin_erf(f);        __builtin_erff(f);       __builtin_erfl(f);
+  __builtin_erf(f);        __builtin_erff(f);       __builtin_erfl(f); __builtin_erff128(f);
 
 // NO__ERRNO: declare double @erf(double) [[READNONE]]
 // NO__ERRNO: declare float @erff(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @erfl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @erff128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @erf(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @erff(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @erff128(fp128) [[NOT_READNONE]]
 
-  __builtin_erfc(f);       __builtin_erfcf(f);      __builtin_erfcl(f);
+__builtin_erfc(f);       __builtin_erfcf(f);      __builtin_erfcl(f); __builtin_erfcf128(f);
 
 // NO__ERRNO: declare double @erfc(double) [[READNONE]]
 // NO__ERRNO: declare float @erfcf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @erfcf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @erfc(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @erfcf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @erfcf128(fp128) [[NOT_READNONE]]
 
-  __builtin_exp(f);        __builtin_expf(f);       __builtin_expl(f);
+__builtin_exp(f);        __builtin_expf(f);       __builtin_expl(f); __builtin_expf128(f);
 
 // NO__ERRNO: declare double @llvm.exp.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.exp.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.exp.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.exp.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @exp(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @expf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @expl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @expf128(fp128) [[NOT_READNONE]]
 
-  __builtin_exp2(f);       __builtin_exp2f(f);      __builtin_exp2l(f); 
+__builtin_exp2(f);       __builtin_exp2f(f);      __builtin_exp2l(f); __builtin_exp2f128(f);
 
 // NO__ERRNO: declare double @llvm.exp2.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.exp2.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.exp2.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.exp2.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @exp2(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @exp2f(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @exp2f128(fp128) [[NOT_READNONE]]
 
-  __builtin_expm1(f);      __builtin_expm1f(f);     __builtin_expm1l(f);
+__builtin_expm1(f);      __builtin_expm1f(f);     __builtin_expm1l(f); __builtin_expm1f128(f);
 
 // NO__ERRNO: declare double @expm1(double) [[READNONE]]
 // NO__ERRNO: declare float @expm1f(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @expm1f128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @expm1(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @expm1f(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @expm1f128(fp128) [[NOT_READNONE]]
 
-  __builtin_fdim(f,f);       __builtin_fdimf(f,f);      __builtin_fdiml(f,f);
+__builtin_fdim(f,f);       __builtin_fdimf(f,f);      __builtin_fdiml(f,f); __builtin_fdimf128(f,f);
 
 // NO__ERRNO: declare double @fdim(double, double) [[READNONE]]
 // NO__ERRNO: declare float @fdimf(float, float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @fdimf128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @fdim(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @fdimf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @fdimf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_floor(f);      __builtin_floorf(f);     __builtin_floorl(f);
+__builtin_floor(f);      __builtin_floorf(f);     __builtin_floorl(f); __builtin_floorf128(f);
 
 // NO__ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.floor.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.floor.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_fma(f,f,f);        __builtin_fmaf(f,f,f);       __builtin_fmal(f,f,f);
+__builtin_fma(f,f,f);        __builtin_fmaf(f,f,f);       __builtin_fmal(f,f,f); __builtin_fmaf128(f,f,f);
 
 // NO__ERRNO: declare double @llvm.fma.f64(double, double, double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.fma.f32(float, float, float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.fma.f128(fp128, fp128, fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @fma(double, double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @fmaf(float, float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @fmaf128(fp128, fp128, fp128) [[NOT_READNONE]]
 
 // On GNU or Win, fma never sets errno, so we can convert to the intrinsic.
 
@@ -306,275 +354,335 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
 // Long double is just double on win, so no f80 use/declaration.
 // HAS_ERRNO_WIN-NOT: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80)
 
-  __builtin_fmax(f,f);       __builtin_fmaxf(f,f);      __builtin_fmaxl(f,f);
+__builtin_fmax(f,f);       __builtin_fmaxf(f,f);      __builtin_fmaxl(f,f); __builtin_fmaxf128(f,f);
 
 // NO__ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.maxnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.maxnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_fmin(f,f);       __builtin_fminf(f,f);      __builtin_fminl(f,f);
+__builtin_fmin(f,f);       __builtin_fminf(f,f);      __builtin_fminl(f,f); __builtin_fminf128(f,f);
 
 // NO__ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.minnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.minnum.f128(fp128, fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_hypot(f,f);      __builtin_hypotf(f,f);     __builtin_hypotl(f,f);
+__builtin_hypot(f,f);      __builtin_hypotf(f,f);     __builtin_hypotl(f,f); __builtin_hypotf128(f,f);
 
 // NO__ERRNO: declare double @hypot(double, double) [[READNONE]]
 // NO__ERRNO: declare float @hypotf(float, float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @hypotf128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @hypot(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @hypotf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @hypotf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_ilogb(f);      __builtin_ilogbf(f);     __builtin_ilogbl(f); 
+__builtin_ilogb(f);      __builtin_ilogbf(f);     __builtin_ilogbl(f); __builtin_ilogbf128(f);
 
 // NO__ERRNO: declare i32 @ilogb(double) [[READNONE]]
 // NO__ERRNO: declare i32 @ilogbf(float) [[READNONE]]
 // NO__ERRNO: declare i32 @ilogbl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare i32 @ilogbf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare i32 @ilogb(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare i32 @ilogbf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare i32 @ilogbl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare i32 @ilogbf128(fp128) [[NOT_READNONE]]
 
-  __builtin_lgamma(f);     __builtin_lgammaf(f);    __builtin_lgammal(f);
+__builtin_lgamma(f);     __builtin_lgammaf(f);    __builtin_lgammal(f); __builtin_lgammaf128(f);
 
 // NO__ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
 // NO__ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
 // NO__ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
+// NO__ERRNO: declare fp128 @lgammaf128(fp128) [[NOT_READNONE]]
 // HAS_ERRNO: declare double @lgamma(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @lgammaf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @lgammal(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @lgammaf128(fp128) [[NOT_READNONE]]
 
-  __builtin_llrint(f);     __builtin_llrintf(f);    __builtin_llrintl(f);
+__builtin_llrint(f);     __builtin_llrintf(f);    __builtin_llrintl(f); __builtin_llrintf128(f);
 
 // NO__ERRNO: declare i64 @llvm.llrint.i64.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.llrint.i64.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.llrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare i64 @llvm.llrint.i64.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare i64 @llrint(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @llrintf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @llrintl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare i64 @llrintf128(fp128) [[NOT_READNONE]]
 
-  __builtin_llround(f);    __builtin_llroundf(f);   __builtin_llroundl(f);
+__builtin_llround(f);    __builtin_llroundf(f);   __builtin_llroundl(f); __builtin_llroundf128(f);
 
 // NO__ERRNO: declare i64 @llvm.llround.i64.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.llround.i64.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.llround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare i64 @llvm.llround.i64.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare i64 @llround(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @llroundf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @llroundl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare i64 @llroundf128(fp128) [[NOT_READNONE]]
 
-  __builtin_log(f);        __builtin_logf(f);       __builtin_logl(f);
+__builtin_log(f);        __builtin_logf(f);       __builtin_logl(f); __builtin_logf128(f);
 
 // NO__ERRNO: declare double @llvm.log.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.log.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.log.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.log.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @log(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @logf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @logl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @logf128(fp128) [[NOT_READNONE]]
 
-  __builtin_log10(f);      __builtin_log10f(f);     __builtin_log10l(f);
+__builtin_log10(f);      __builtin_log10f(f);     __builtin_log10l(f); __builtin_log10f128(f);
 
 // NO__ERRNO: declare double @llvm.log10.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.log10.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.log10.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.log10.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @log10(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @log10f(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @log10f128(fp128) [[NOT_READNONE]]
 
-  __builtin_log1p(f);      __builtin_log1pf(f);     __builtin_log1pl(f);
+__builtin_log1p(f);      __builtin_log1pf(f);     __builtin_log1pl(f); __builtin_log1pf128(f);
 
 // NO__ERRNO: declare double @log1p(double) [[READNONE]]
 // NO__ERRNO: declare float @log1pf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @log1pf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @log1p(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @log1pf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @log1pf128(fp128) [[NOT_READNONE]]
 
-  __builtin_log2(f);       __builtin_log2f(f);      __builtin_log2l(f);
+__builtin_log2(f);       __builtin_log2f(f);      __builtin_log2l(f); __builtin_log2f128(f);
 
 // NO__ERRNO: declare double @llvm.log2.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.log2.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.log2.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.log2.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @log2(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @log2f(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @log2f128(fp128) [[NOT_READNONE]]
 
-  __builtin_logb(f);       __builtin_logbf(f);      __builtin_logbl(f);
+__builtin_logb(f);       __builtin_logbf(f);      __builtin_logbl(f); __builtin_logbf128(f);
 
 // NO__ERRNO: declare double @logb(double) [[READNONE]]
 // NO__ERRNO: declare float @logbf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @logbl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @logbf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @logb(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @logbf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @logbf128(fp128) [[NOT_READNONE]]
 
-  __builtin_lrint(f);      __builtin_lrintf(f);     __builtin_lrintl(f);
+__builtin_lrint(f);      __builtin_lrintf(f);     __builtin_lrintl(f); __builtin_lrintf128(f);
 
 // NO__ERRNO: declare i64 @llvm.lrint.i64.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.lrint.i64.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.lrint.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare i64 @llvm.lrint.i64.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare i64 @lrint(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @lrintf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @lrintl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare i64 @lrintf128(fp128) [[NOT_READNONE]]
 
-  __builtin_lround(f);     __builtin_lroundf(f);    __builtin_lroundl(f);
+__builtin_lround(f);     __builtin_lroundf(f);    __builtin_lroundl(f);  __builtin_lroundf128(f);
 
 // NO__ERRNO: declare i64 @llvm.lround.i64.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.lround.i64.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare i64 @llvm.lround.i64.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare i64 @llvm.lround.i64.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare i64 @lround(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @lroundf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare i64 @lroundl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare i64 @lroundf128(fp128) [[NOT_READNONE]]
 
-  __builtin_nearbyint(f);  __builtin_nearbyintf(f); __builtin_nearbyintl(f);
+__builtin_nearbyint(f);  __builtin_nearbyintf(f); __builtin_nearbyintl(f); __builtin_nearbyintf128(f);
 
 // NO__ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.nearbyint.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.nearbyint.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_nextafter(f,f);  __builtin_nextafterf(f,f); __builtin_nextafterl(f,f);
+__builtin_nextafter(f,f);  __builtin_nextafterf(f,f); __builtin_nextafterl(f,f); __builtin_nextafterf128(f,f);
 
 // NO__ERRNO: declare double @nextafter(double, double) [[READNONE]]
 // NO__ERRNO: declare float @nextafterf(float, float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @nextafterf128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @nextafter(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @nextafterf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @nextafterf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_nexttoward(f,f); __builtin_nexttowardf(f,f);__builtin_nexttowardl(f,f);
+__builtin_nexttoward(f,f); __builtin_nexttowardf(f,f);__builtin_nexttowardl(f,f); __builtin_nexttowardf128(f,f);
 
 // NO__ERRNO: declare double @nexttoward(double, x86_fp80) [[READNONE]]
 // NO__ERRNO: declare float @nexttowardf(float, x86_fp80) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @nexttowardf128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @nexttoward(double, x86_fp80) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @nexttowardf(float, x86_fp80) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @nexttowardf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_remainder(f,f);  __builtin_remainderf(f,f); __builtin_remainderl(f,f);
+__builtin_remainder(f,f);  __builtin_remainderf(f,f); __builtin_remainderl(f,f); __builtin_remainderf128(f,f);
 
 // NO__ERRNO: declare double @remainder(double, double) [[READNONE]]
 // NO__ERRNO: declare float @remainderf(float, float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @remainderf128(fp128, fp128) [[READNONE]]
 // HAS_ERRNO: declare double @remainder(double, double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @remainderf(float, float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @remainderf128(fp128, fp128) [[NOT_READNONE]]
 
-  __builtin_remquo(f,f,i);  __builtin_remquof(f,f,i); __builtin_remquol(f,f,i);
+__builtin_remquo(f,f,i);  __builtin_remquof(f,f,i); __builtin_remquol(f,f,i); __builtin_remquof128(f,f,i);
 
 // NO__ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
 // NO__ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
 // NO__ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
+// NO__ERRNO: declare fp128 @remquof128(fp128, fp128, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare double @remquo(double, double, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @remquof(float, float, i32*) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80, x86_fp80, i32*) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @remquof128(fp128, fp128, i32*) [[NOT_READNONE]]
 
-  __builtin_rint(f);       __builtin_rintf(f);      __builtin_rintl(f);
+__builtin_rint(f);       __builtin_rintf(f);      __builtin_rintl(f); __builtin_rintf128(f);
 
 // NO__ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.rint.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.rint.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_round(f);      __builtin_roundf(f);     __builtin_roundl(f);
+__builtin_round(f);      __builtin_roundf(f);     __builtin_roundl(f); __builtin_roundf128(f);
 
 // NO__ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.round.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.round.f128(fp128) [[READNONE_INTRINSIC]]
 
-  __builtin_scalbln(f,f);    __builtin_scalblnf(f,f);   __builtin_scalblnl(f,f);
+__builtin_scalbln(f,f);    __builtin_scalblnf(f,f);   __builtin_scalblnl(f,f); __builtin_scalblnf128(f,f);
 
 // NO__ERRNO: declare double @scalbln(double, i64) [[READNONE]]
 // NO__ERRNO: declare float @scalblnf(float, i64) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[READNONE]]
+// NO__ERRNO: declare fp128 @scalblnf128(fp128, i64) [[READNONE]]
 // HAS_ERRNO: declare double @scalbln(double, i64) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @scalblnf(float, i64) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @scalblnf128(fp128, i64) [[NOT_READNONE]]
 
-  __builtin_scalbn(f,f);     __builtin_scalbnf(f,f);    __builtin_scalbnl(f,f);
+__builtin_scalbn(f,f);     __builtin_scalbnf(f,f);    __builtin_scalbnl(f,f); __builtin_scalbnf128(f,f);
 
 // NO__ERRNO: declare double @scalbn(double, i32) [[READNONE]]
 // NO__ERRNO: declare float @scalbnf(float, i32) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[READNONE]]
+// NO__ERRNO: declare fp128 @scalbnf128(fp128, i32) [[READNONE]]
 // HAS_ERRNO: declare double @scalbn(double, i32) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @scalbnf(float, i32) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @scalbnf128(fp128, i32) [[NOT_READNONE]]
 
-  __builtin_sin(f);        __builtin_sinf(f);       __builtin_sinl(f);
+__builtin_sin(f);        __builtin_sinf(f);       __builtin_sinl(f); __builtin_sinf128(f);
 
 // NO__ERRNO: declare double @llvm.sin.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.sin.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.sin.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.sin.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @sin(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @sinf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @sinf128(fp128) [[NOT_READNONE]]
 
-  __builtin_sinh(f);       __builtin_sinhf(f);      __builtin_sinhl(f);
+__builtin_sinh(f);       __builtin_sinhf(f);      __builtin_sinhl(f); __builtin_sinhf128(f);
 
 // NO__ERRNO: declare double @sinh(double) [[READNONE]]
 // NO__ERRNO: declare float @sinhf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @sinhf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @sinh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @sinhf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @sinhf128(fp128) [[NOT_READNONE]]
 
-  __builtin_sqrt(f);       __builtin_sqrtf(f);      __builtin_sqrtl(f); 
+__builtin_sqrt(f);       __builtin_sqrtf(f);      __builtin_sqrtl(f); __builtin_sqrtf128(f);
 
 // NO__ERRNO: declare double @llvm.sqrt.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.sqrt.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.sqrt.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.sqrt.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @sqrt(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @sqrtf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @sqrtf128(fp128) [[NOT_READNONE]]
 
-  __builtin_tan(f);        __builtin_tanf(f);       __builtin_tanl(f);
+__builtin_tan(f);        __builtin_tanf(f);       __builtin_tanl(f); __builtin_tanf128(f);
 
 // NO__ERRNO: declare double @tan(double) [[READNONE]]
 // NO__ERRNO: declare float @tanf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @tanf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @tan(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @tanf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @tanf128(fp128) [[NOT_READNONE]]
 
-  __builtin_tanh(f);       __builtin_tanhf(f);      __builtin_tanhl(f);
+__builtin_tanh(f);       __builtin_tanhf(f);      __builtin_tanhl(f); __builtin_tanhf128(f);
 
 // NO__ERRNO: declare double @tanh(double) [[READNONE]]
 // NO__ERRNO: declare float @tanhf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @tanhf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @tanh(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @tanhf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @tanhf128(fp128) [[NOT_READNONE]]
 
-  __builtin_tgamma(f);     __builtin_tgammaf(f);    __builtin_tgammal(f);
+__builtin_tgamma(f);     __builtin_tgammaf(f);    __builtin_tgammal(f); __builtin_tgammaf128(f);
 
 // NO__ERRNO: declare double @tgamma(double) [[READNONE]]
 // NO__ERRNO: declare float @tgammaf(float) [[READNONE]]
 // NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[READNONE]]
+// NO__ERRNO: declare fp128 @tgammaf128(fp128) [[READNONE]]
 // HAS_ERRNO: declare double @tgamma(double) [[NOT_READNONE]]
 // HAS_ERRNO: declare float @tgammaf(float) [[NOT_READNONE]]
 // HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[NOT_READNONE]]
+// HAS_ERRNO: declare fp128 @tgammaf128(fp128) [[NOT_READNONE]]
 
-  __builtin_trunc(f);      __builtin_truncf(f);     __builtin_truncl(f);
+__builtin_trunc(f);      __builtin_truncf(f);     __builtin_truncl(f); __builtin_truncf128(f);
 
 // NO__ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
 // NO__ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// NO__ERRNO: declare fp128 @llvm.trunc.f128(fp128) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare double @llvm.trunc.f64(double) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare float @llvm.trunc.f32(float) [[READNONE_INTRINSIC]]
 // HAS_ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
+// HAS_ERRNO: declare fp128 @llvm.trunc.f128(fp128) [[READNONE_INTRINSIC]]
 };
 
 // NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }


        


More information about the cfe-commits mailing list