Index: lib/Sema/SemaDecl.cpp =================================================================== --- lib/Sema/SemaDecl.cpp +++ lib/Sema/SemaDecl.cpp @@ -13445,27 +13445,35 @@ // Mark const if we don't care about errno and that is the only thing // preventing the function from being const. This allows IRgen to use LLVM // intrinsics for such functions. - if (!getLangOpts().MathErrno && !FD->hasAttr() && - Context.BuiltinInfo.isConstWithoutErrno(BuiltinID)) - FD->addAttr(ConstAttr::CreateImplicit(Context, FD->getLocation())); - + // // We make "fma" on some platforms const because we know it does not set // errno in those environments even though it could set errno based on the // C standard. - const llvm::Triple &Trip = Context.getTargetInfo().getTriple(); - if ((Trip.isGNUEnvironment() || Trip.isAndroid() || Trip.isOSMSVCRT()) && - !FD->hasAttr()) { + auto const isKnownNotToChangeErrnoOnTarget = [](ASTContext &Context, + unsigned BuiltinID) { + auto &triple = Context.getTargetInfo().getTriple(); switch (BuiltinID) { case Builtin::BI__builtin_fma: case Builtin::BI__builtin_fmaf: case Builtin::BI__builtin_fmal: case Builtin::BIfma: case Builtin::BIfmaf: - case Builtin::BIfmal: - FD->addAttr(ConstAttr::CreateImplicit(Context, FD->getLocation())); - break; + case Builtin::BIfmal: + return triple.isGNUEnvironment() || + triple.isAndroid() || + triple.isOSMSVCRT(); default: - break; + return false; + } + }; + + if (!FD->hasAttr() && + Context.BuiltinInfo.isConstWithoutErrno(BuiltinID)) { + if (!getLangOpts().MathErrno || + isKnownNotToChangeErrnoOnTarget(Context, BuiltinID)) { + FD->addAttr(ConstAttr::CreateImplicit(Context, FD->getLocation())); + } else { + FD->addAttr(WriteOnlyAttr::CreateImplicit(Context, FD->getLocation())); } } Index: test/CodeGen/complex-builtins.c =================================================================== --- test/CodeGen/complex-builtins.c +++ test/CodeGen/complex-builtins.c @@ -9,99 +9,99 @@ // NO__ERRNO: declare double @cabs(double, double) [[READNONE:#[0-9]+]] // NO__ERRNO: declare float @cabsf(<2 x float>) [[READNONE]] // NO__ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE:#[0-9]+]] -// HAS_ERRNO: declare double @cabs(double, double) [[NOT_READNONE:#[0-9]+]] -// HAS_ERRNO: declare float @cabsf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare double @cabs(double, double) [[WRITEONLY:#[0-9]+]] +// HAS_ERRNO: declare float @cabsf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_cacos(f); __builtin_cacosf(f); __builtin_cacosl(f); // NO__ERRNO: declare { double, double } @cacos(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cacos(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cacos(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_cacosh(f); __builtin_cacoshf(f); __builtin_cacoshl(f); // NO__ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_carg(f); __builtin_cargf(f); __builtin_cargl(f); // NO__ERRNO: declare double @carg(double, double) [[READNONE]] // NO__ERRNO: declare float @cargf(<2 x float>) [[READNONE]] // NO__ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare double @carg(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare float @cargf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare double @carg(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @cargf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_casin(f); __builtin_casinf(f); __builtin_casinl(f); // NO__ERRNO: declare { double, double } @casin(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @casin(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @casin(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_casinh(f); __builtin_casinhf(f); __builtin_casinhl(f); // NO__ERRNO: declare { double, double } @casinh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @casinh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @casinh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_catan(f); __builtin_catanf(f); __builtin_catanl(f); // NO__ERRNO: declare { double, double } @catan(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @catan(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @catan(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_catanh(f); __builtin_catanhf(f); __builtin_catanhl(f); // NO__ERRNO: declare { double, double } @catanh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @catanh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @catanh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_ccos(f); __builtin_ccosf(f); __builtin_ccosl(f); // NO__ERRNO: declare { double, double } @ccos(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ccos(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ccos(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_ccosh(f); __builtin_ccoshf(f); __builtin_ccoshl(f); // NO__ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_cexp(f); __builtin_cexpf(f); __builtin_cexpl(f); // NO__ERRNO: declare { double, double } @cexp(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cexp(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cexp(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_cimag(f); __builtin_cimagf(f); __builtin_cimagl(f); @@ -122,9 +122,9 @@ // NO__ERRNO: declare { double, double } @clog(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @clog(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @clog(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_cproj(f); __builtin_cprojf(f); __builtin_cprojl(f); @@ -133,16 +133,16 @@ // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] // HAS_ERRNO: declare { double, double } @cproj(double, double) [[READNONE:#[0-9]+]] // HAS_ERRNO: declare <2 x float> @cprojf(<2 x float>) [[READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cprojl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE:#[0-9]+]] __builtin_cpow(f,f); __builtin_cpowf(f,f); __builtin_cpowl(f,f); // NO__ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_creal(f); __builtin_crealf(f); __builtin_creall(f); @@ -156,51 +156,51 @@ // NO__ERRNO: declare { double, double } @csin(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csin(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csin(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_csinh(f); __builtin_csinhf(f); __builtin_csinhl(f); // NO__ERRNO: declare { double, double } @csinh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csinh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csinh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_csqrt(f); __builtin_csqrtf(f); __builtin_csqrtl(f); // NO__ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_ctan(f); __builtin_ctanf(f); __builtin_ctanl(f); // NO__ERRNO: declare { double, double } @ctan(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ctan(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ctan(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] __builtin_ctanh(f); __builtin_ctanhf(f); __builtin_ctanhl(f); // NO__ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] }; // NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } -// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } +// HAS_ERRNO: attributes [[WRITEONLY]] = { nounwind writeonly "correctly{{.*}} } // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } - +// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } Index: test/CodeGen/complex-libcalls.c =================================================================== --- test/CodeGen/complex-libcalls.c +++ test/CodeGen/complex-libcalls.c @@ -9,99 +9,99 @@ // NO__ERRNO: declare double @cabs(double, double) [[READNONE:#[0-9]+]] // NO__ERRNO: declare float @cabsf(<2 x float>) [[READNONE]] // NO__ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE:#[0-9]+]] -// HAS_ERRNO: declare double @cabs(double, double) [[NOT_READNONE:#[0-9]+]] -// HAS_ERRNO: declare float @cabsf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare double @cabs(double, double) [[WRITEONLY:#[0-9]+]] +// HAS_ERRNO: declare float @cabsf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cabsl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] cacos(f); cacosf(f); cacosl(f); // NO__ERRNO: declare { double, double } @cacos(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cacosf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cacos(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cacos(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cacosf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacosl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] cacosh(f); cacoshf(f); cacoshl(f); // NO__ERRNO: declare { double, double } @cacosh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cacosh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] carg(f); cargf(f); cargl(f); // NO__ERRNO: declare double @carg(double, double) [[READNONE]] // NO__ERRNO: declare float @cargf(<2 x float>) [[READNONE]] // NO__ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare double @carg(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare float @cargf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare double @carg(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @cargf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cargl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] casin(f); casinf(f); casinl(f); // NO__ERRNO: declare { double, double } @casin(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @casinf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @casin(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @casin(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @casinf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] casinh(f); casinhf(f); casinhl(f); // NO__ERRNO: declare { double, double } @casinh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @casinhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @casinh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @casinh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @casinhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @casinhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] catan(f); catanf(f); catanl(f); // NO__ERRNO: declare { double, double } @catan(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @catanf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @catan(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @catan(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @catanf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] catanh(f); catanhf(f); catanhl(f); // NO__ERRNO: declare { double, double } @catanh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @catanhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @catanh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @catanh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @catanhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @catanhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] ccos(f); ccosf(f); ccosl(f); // NO__ERRNO: declare { double, double } @ccos(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ccosf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ccos(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ccos(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ccosf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] ccosh(f); ccoshf(f); ccoshl(f); // NO__ERRNO: declare { double, double } @ccosh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ccosh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ccoshl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] cexp(f); cexpf(f); cexpl(f); // NO__ERRNO: declare { double, double } @cexp(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cexpf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cexp(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cexp(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cexpf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] cimag(f); cimagf(f); cimagl(f); @@ -117,16 +117,16 @@ // NO__ERRNO: declare { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] // HAS_ERRNO: declare { double, double } @conj(double, double) [[READNONE:#[0-9]+]] // HAS_ERRNO: declare <2 x float> @conjf(<2 x float>) [[READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @conjl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE:#[0-9]+]] clog(f); clogf(f); clogl(f); // NO__ERRNO: declare { double, double } @clog(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @clogf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @clog(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @clog(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @clogf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @clogl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] cproj(f); cprojf(f); cprojl(f); @@ -142,9 +142,9 @@ // NO__ERRNO: declare { double, double } @cpow(double, double, double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @cpow(double, double, double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @cpowl({ x86_fp80, x86_fp80 }* byval align 16, { x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] creal(f); crealf(f); creall(f); @@ -158,51 +158,51 @@ // NO__ERRNO: declare { double, double } @csin(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csinf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csin(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csin(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csinf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] csinh(f); csinhf(f); csinhl(f); // NO__ERRNO: declare { double, double } @csinh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csinhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csinh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csinh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csinhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csinhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] csqrt(f); csqrtf(f); csqrtl(f); // NO__ERRNO: declare { double, double } @csqrt(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @csqrt(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @csqrtl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] ctan(f); ctanf(f); ctanl(f); // NO__ERRNO: declare { double, double } @ctan(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ctanf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ctan(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ctan(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ctanf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] ctanh(f); ctanhf(f); ctanhl(f); // NO__ERRNO: declare { double, double } @ctanh(double, double) [[READNONE]] // NO__ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[READNONE]] // NO__ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] -// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[NOT_READNONE]] -// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NOT_READNONE]] -// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[NOT_READNONE]] +// HAS_ERRNO: declare { double, double } @ctanh(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[WRITEONLY]] +// HAS_ERRNO: declare { x86_fp80, x86_fp80 } @ctanhl({ x86_fp80, x86_fp80 }* byval align 16) [[WRITEONLY]] }; // NO__ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } -// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } +// HAS_ERRNO: attributes [[WRITEONLY]] = { nounwind writeonly "correctly{{.*}} } // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } - +// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } Index: test/CodeGen/libcall-declarations.c =================================================================== --- test/CodeGen/libcall-declarations.c +++ test/CodeGen/libcall-declarations.c @@ -569,50 +569,50 @@ // CHECK-ERRNO: declare double @trunc(double) [[NUWRN]] // CHECK-ERRNO: declare float @truncf(float) [[NUWRN]] // CHECK-ERRNO: declare x86_fp80 @truncl(x86_fp80) [[NUWRN]] -// CHECK-ERRNO: declare double @cabs(double, double) [[NONCONST]] -// CHECK-ERRNO: declare float @cabsf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @cacos(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @cacosf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @cacosh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare double @carg(double, double) [[NONCONST]] -// CHECK-ERRNO: declare float @cargf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @casin(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @casinf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @casinh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @casinhf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @catan(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @catanf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @catanh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @catanhf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @ccos(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @ccosf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @ccosh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @cexp(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @cexpf(<2 x float>) [[NONCONST]] +// CHECK-ERRNO: declare double @cabs(double, double) [[WRITEONLY:#[0-9]+]] +// CHECK-ERRNO: declare float @cabsf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @cacos(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @cacosf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @cacosh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @cacoshf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare double @carg(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare float @cargf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @casin(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @casinf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @casinh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @casinhf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @catan(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @catanf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @catanh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @catanhf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @ccos(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @ccosf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @ccosh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @ccoshf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @cexp(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @cexpf(<2 x float>) [[WRITEONLY]] // CHECK-ERRNO: declare double @cimag(double, double) [[NUWRN]] // CHECK-ERRNO: declare float @cimagf(<2 x float>) [[NUWRN]] // CHECK-ERRNO: declare { double, double } @conj(double, double) [[NUWRN]] // CHECK-ERRNO: declare <2 x float> @conjf(<2 x float>) [[NUWRN]] -// CHECK-ERRNO: declare { double, double } @clog(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @clogf(<2 x float>) [[NONCONST]] +// CHECK-ERRNO: declare { double, double } @clog(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @clogf(<2 x float>) [[WRITEONLY]] // CHECK-ERRNO: declare { double, double } @cproj(double, double) [[NUWRN]] // CHECK-ERRNO: declare <2 x float> @cprojf(<2 x float>) [[NUWRN]] -// CHECK-ERRNO: declare { double, double } @cpow(double, double, double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[NONCONST]] +// CHECK-ERRNO: declare { double, double } @cpow(double, double, double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @cpowf(<2 x float>, <2 x float>) [[WRITEONLY]] // CHECK-ERRNO: declare double @creal(double, double) [[NUWRN]] // CHECK-ERRNO: declare float @crealf(<2 x float>) [[NUWRN]] -// CHECK-ERRNO: declare { double, double } @csin(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @csinf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @csinh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @csinhf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @csqrt(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @ctan(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @ctanf(<2 x float>) [[NONCONST]] -// CHECK-ERRNO: declare { double, double } @ctanh(double, double) [[NONCONST]] -// CHECK-ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NONCONST]] +// CHECK-ERRNO: declare { double, double } @csin(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @csinf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @csinh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @csinhf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @csqrt(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @csqrtf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @ctan(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @ctanf(<2 x float>) [[WRITEONLY]] +// CHECK-ERRNO: declare { double, double } @ctanh(double, double) [[WRITEONLY]] +// CHECK-ERRNO: declare <2 x float> @ctanhf(<2 x float>) [[WRITEONLY]] // CHECK-NOERRNO: attributes [[NUWRN]] = { nounwind readnone{{.*}} } // CHECK-NOERRNO: attributes [[NUWRO]] = { nounwind readonly{{.*}} } Index: test/CodeGen/math-builtins.c =================================================================== --- test/CodeGen/math-builtins.c +++ test/CodeGen/math-builtins.c @@ -12,18 +12,18 @@ // NO__ERRNO: frem double // NO__ERRNO: frem float // NO__ERRNO: frem x86_fp80 -// 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 double @fmod(double, double) [[WRITEONLY:#[0-9]+]] +// HAS_ERRNO: declare float @fmodf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_atan2(f,f); __builtin_atan2f(f,f) ; __builtin_atan2l(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]] -// 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 double @atan2(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atan2f(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_copysign(f,f); __builtin_copysignf(f,f); __builtin_copysignl(f,f); __builtin_copysignf128(f,f); @@ -52,7 +52,7 @@ // 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]] -// HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE]] +// HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE:#[0-9]+]] // HAS_ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]] @@ -75,9 +75,9 @@ // 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]] -// 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 double @ldexp(double, i32) [[WRITEONLY]] +// HAS_ERRNO: declare float @ldexpf(float, i32) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[WRITEONLY]] __builtin_modf(f,d); __builtin_modff(f,fp); __builtin_modfl(f,l); @@ -115,9 +115,9 @@ // 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]] -// 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 double @pow(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @powf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_powi(f,f); __builtin_powif(f,f); __builtin_powil(f,f); @@ -134,54 +134,54 @@ // NO__ERRNO: declare double @acos(double) [[READNONE]] // NO__ERRNO: declare float @acosf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @acosl(x86_fp80) [[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 double @acos(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @acosf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80) [[WRITEONLY]] __builtin_acosh(f); __builtin_acoshf(f); __builtin_acoshl(f); // NO__ERRNO: declare double @acosh(double) [[READNONE]] // NO__ERRNO: declare float @acoshf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[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 double @acosh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @acoshf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[WRITEONLY]] __builtin_asin(f); __builtin_asinf(f); __builtin_asinl(f); // NO__ERRNO: declare double @asin(double) [[READNONE]] // NO__ERRNO: declare float @asinf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @asinl(x86_fp80) [[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 double @asin(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @asinf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80) [[WRITEONLY]] __builtin_asinh(f); __builtin_asinhf(f); __builtin_asinhl(f); // NO__ERRNO: declare double @asinh(double) [[READNONE]] // NO__ERRNO: declare float @asinhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[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 double @asinh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @asinhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[WRITEONLY]] __builtin_atan(f); __builtin_atanf(f); __builtin_atanl(f); // NO__ERRNO: declare double @atan(double) [[READNONE]] // NO__ERRNO: declare float @atanf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @atanl(x86_fp80) [[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 double @atan(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atanf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80) [[WRITEONLY]] __builtin_atanh(f); __builtin_atanhf(f); __builtin_atanhl(f); // NO__ERRNO: declare double @atanh(double) [[READNONE]] // NO__ERRNO: declare float @atanhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[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 double @atanh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atanhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[WRITEONLY]] __builtin_cbrt(f); __builtin_cbrtf(f); __builtin_cbrtl(f); @@ -206,72 +206,72 @@ // 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]] -// 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 double @cos(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @cosf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80) [[WRITEONLY]] __builtin_cosh(f); __builtin_coshf(f); __builtin_coshl(f); // NO__ERRNO: declare double @cosh(double) [[READNONE]] // NO__ERRNO: declare float @coshf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @coshl(x86_fp80) [[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 double @cosh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @coshf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80) [[WRITEONLY]] __builtin_erf(f); __builtin_erff(f); __builtin_erfl(f); // NO__ERRNO: declare double @erf(double) [[READNONE]] // NO__ERRNO: declare float @erff(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @erfl(x86_fp80) [[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 double @erf(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @erff(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80) [[WRITEONLY]] __builtin_erfc(f); __builtin_erfcf(f); __builtin_erfcl(f); // NO__ERRNO: declare double @erfc(double) [[READNONE]] // NO__ERRNO: declare float @erfcf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[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 double @erfc(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @erfcf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[WRITEONLY]] __builtin_exp(f); __builtin_expf(f); __builtin_expl(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]] -// 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 double @exp(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @expf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @expl(x86_fp80) [[WRITEONLY]] __builtin_exp2(f); __builtin_exp2f(f); __builtin_exp2l(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]] -// 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 double @exp2(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @exp2f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[WRITEONLY]] __builtin_expm1(f); __builtin_expm1f(f); __builtin_expm1l(f); // NO__ERRNO: declare double @expm1(double) [[READNONE]] // NO__ERRNO: declare float @expm1f(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[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 double @expm1(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @expm1f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[WRITEONLY]] __builtin_fdim(f,f); __builtin_fdimf(f,f); __builtin_fdiml(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]] -// 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 double @fdim(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @fdimf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_floor(f); __builtin_floorf(f); __builtin_floorl(f); @@ -287,9 +287,9 @@ // 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]] -// 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 double @fma(double, double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @fmaf(float, float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[WRITEONLY]] // On GNU or Win, fma never sets errno, so we can convert to the intrinsic. @@ -329,18 +329,18 @@ // 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]] -// 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 double @hypot(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @hypotf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_ilogb(f); __builtin_ilogbf(f); __builtin_ilogbl(f); // NO__ERRNO: declare i32 @ilogb(double) [[READNONE]] // NO__ERRNO: declare i32 @ilogbf(float) [[READNONE]] // NO__ERRNO: declare i32 @ilogbl(x86_fp80) [[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 @ilogb(double) [[WRITEONLY]] +// HAS_ERRNO: declare i32 @ilogbf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i32 @ilogbl(x86_fp80) [[WRITEONLY]] __builtin_lgamma(f); __builtin_lgammaf(f); __builtin_lgammal(f); @@ -356,81 +356,81 @@ // NO__ERRNO: declare i64 @llrint(double) [[READNONE]] // NO__ERRNO: declare i64 @llrintf(float) [[READNONE]] // NO__ERRNO: declare i64 @llrintl(x86_fp80) [[READNONE]] -// 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 @llrint(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llrintf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llrintl(x86_fp80) [[WRITEONLY]] __builtin_llround(f); __builtin_llroundf(f); __builtin_llroundl(f); // NO__ERRNO: declare i64 @llround(double) [[READNONE]] // NO__ERRNO: declare i64 @llroundf(float) [[READNONE]] // NO__ERRNO: declare i64 @llroundl(x86_fp80) [[READNONE]] -// 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 @llround(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llroundf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llroundl(x86_fp80) [[WRITEONLY]] __builtin_log(f); __builtin_logf(f); __builtin_logl(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]] -// 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 double @log(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @logf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @logl(x86_fp80) [[WRITEONLY]] __builtin_log10(f); __builtin_log10f(f); __builtin_log10l(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]] -// 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 double @log10(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log10f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80) [[WRITEONLY]] __builtin_log1p(f); __builtin_log1pf(f); __builtin_log1pl(f); // NO__ERRNO: declare double @log1p(double) [[READNONE]] // NO__ERRNO: declare float @log1pf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[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 double @log1p(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log1pf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[WRITEONLY]] __builtin_log2(f); __builtin_log2f(f); __builtin_log2l(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]] -// 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 double @log2(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log2f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80) [[WRITEONLY]] __builtin_logb(f); __builtin_logbf(f); __builtin_logbl(f); // NO__ERRNO: declare double @logb(double) [[READNONE]] // NO__ERRNO: declare float @logbf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @logbl(x86_fp80) [[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 double @logb(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @logbf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80) [[WRITEONLY]] __builtin_lrint(f); __builtin_lrintf(f); __builtin_lrintl(f); // NO__ERRNO: declare i64 @lrint(double) [[READNONE]] // NO__ERRNO: declare i64 @lrintf(float) [[READNONE]] // NO__ERRNO: declare i64 @lrintl(x86_fp80) [[READNONE]] -// 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 @lrint(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lrintf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lrintl(x86_fp80) [[WRITEONLY]] __builtin_lround(f); __builtin_lroundf(f); __builtin_lroundl(f); // NO__ERRNO: declare i64 @lround(double) [[READNONE]] // NO__ERRNO: declare i64 @lroundf(float) [[READNONE]] // NO__ERRNO: declare i64 @lroundl(x86_fp80) [[READNONE]] -// 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 @lround(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lroundf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lroundl(x86_fp80) [[WRITEONLY]] __builtin_nearbyint(f); __builtin_nearbyintf(f); __builtin_nearbyintl(f); @@ -446,27 +446,27 @@ // 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]] -// 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 double @nextafter(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @nextafterf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_nexttoward(f,f); __builtin_nexttowardf(f,f);__builtin_nexttowardl(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]] -// 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 double @nexttoward(double, x86_fp80) [[WRITEONLY]] +// HAS_ERRNO: declare float @nexttowardf(float, x86_fp80) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_remainder(f,f); __builtin_remainderf(f,f); __builtin_remainderl(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]] -// 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 double @remainder(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @remainderf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[WRITEONLY]] __builtin_remquo(f,f,i); __builtin_remquof(f,f,i); __builtin_remquol(f,f,i); @@ -500,72 +500,72 @@ // 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]] -// 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 double @scalbln(double, i64) [[WRITEONLY]] +// HAS_ERRNO: declare float @scalblnf(float, i64) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[WRITEONLY]] __builtin_scalbn(f,f); __builtin_scalbnf(f,f); __builtin_scalbnl(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]] -// 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 double @scalbn(double, i32) [[WRITEONLY]] +// HAS_ERRNO: declare float @scalbnf(float, i32) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[WRITEONLY]] __builtin_sin(f); __builtin_sinf(f); __builtin_sinl(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]] -// 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 double @sin(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sinf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[WRITEONLY]] __builtin_sinh(f); __builtin_sinhf(f); __builtin_sinhl(f); // NO__ERRNO: declare double @sinh(double) [[READNONE]] // NO__ERRNO: declare float @sinhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[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 double @sinh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sinhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[WRITEONLY]] __builtin_sqrt(f); __builtin_sqrtf(f); __builtin_sqrtl(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]] -// 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 double @sqrt(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sqrtf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[WRITEONLY]] __builtin_tan(f); __builtin_tanf(f); __builtin_tanl(f); // NO__ERRNO: declare double @tan(double) [[READNONE]] // NO__ERRNO: declare float @tanf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[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 double @tan(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tanf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[WRITEONLY]] __builtin_tanh(f); __builtin_tanhf(f); __builtin_tanhl(f); // NO__ERRNO: declare double @tanh(double) [[READNONE]] // NO__ERRNO: declare float @tanhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[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 double @tanh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tanhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[WRITEONLY]] __builtin_tgamma(f); __builtin_tgammaf(f); __builtin_tgammal(f); // NO__ERRNO: declare double @tgamma(double) [[READNONE]] // NO__ERRNO: declare float @tgammaf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[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 double @tgamma(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tgammaf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[WRITEONLY]] __builtin_trunc(f); __builtin_truncf(f); __builtin_truncl(f); @@ -583,8 +583,9 @@ // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } // NO__ERRNO: attributes [[PURE]] = { {{.*}}readonly{{.*}} } -// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } +// HAS_ERRNO: attributes [[WRITEONLY]] = { nounwind writeonly "correctly{{.*}} } // HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} } +// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } // HAS_ERRNO: attributes [[PURE]] = { {{.*}}readonly{{.*}} } // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } Index: test/CodeGen/math-libcalls.c =================================================================== --- test/CodeGen/math-libcalls.c +++ test/CodeGen/math-libcalls.c @@ -11,18 +11,18 @@ // NO__ERRNO: frem double // NO__ERRNO: frem float // NO__ERRNO: frem x86_fp80 -// 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 double @fmod(double, double) [[WRITEONLY:#[0-9]+]] +// HAS_ERRNO: declare float @fmodf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80, x86_fp80) [[WRITEONLY]] atan2(f,f); atan2f(f,f) ; atan2l(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]] -// 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 double @atan2(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atan2f(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[WRITEONLY]] copysign(f,f); copysignf(f,f);copysignl(f,f); @@ -47,7 +47,7 @@ // 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]] -// HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE]] +// HAS_ERRNO: declare double @frexp(double, i32*) [[NOT_READNONE:#[0-9]+]] // HAS_ERRNO: declare float @frexpf(float, i32*) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80, i32*) [[NOT_READNONE]] @@ -56,9 +56,9 @@ // 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]] -// 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 double @ldexp(double, i32) [[WRITEONLY]] +// HAS_ERRNO: declare float @ldexpf(float, i32) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80, i32) [[WRITEONLY]] modf(f,d); modff(f,fp); modfl(f,l); @@ -83,9 +83,9 @@ // 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]] -// 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 double @pow(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @powf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) [[WRITEONLY]] /* math */ acos(f); acosf(f); acosl(f); @@ -93,54 +93,54 @@ // NO__ERRNO: declare double @acos(double) [[READNONE]] // NO__ERRNO: declare float @acosf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @acosl(x86_fp80) [[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 double @acos(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @acosf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80) [[WRITEONLY]] acosh(f); acoshf(f); acoshl(f); // NO__ERRNO: declare double @acosh(double) [[READNONE]] // NO__ERRNO: declare float @acoshf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[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 double @acosh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @acoshf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80) [[WRITEONLY]] asin(f); asinf(f); asinl(f); // NO__ERRNO: declare double @asin(double) [[READNONE]] // NO__ERRNO: declare float @asinf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @asinl(x86_fp80) [[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 double @asin(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @asinf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80) [[WRITEONLY]] asinh(f); asinhf(f); asinhl(f); // NO__ERRNO: declare double @asinh(double) [[READNONE]] // NO__ERRNO: declare float @asinhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[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 double @asinh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @asinhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80) [[WRITEONLY]] atan(f); atanf(f); atanl(f); // NO__ERRNO: declare double @atan(double) [[READNONE]] // NO__ERRNO: declare float @atanf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @atanl(x86_fp80) [[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 double @atan(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atanf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80) [[WRITEONLY]] atanh(f); atanhf(f); atanhl(f); // NO__ERRNO: declare double @atanh(double) [[READNONE]] // NO__ERRNO: declare float @atanhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[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 double @atanh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @atanhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80) [[WRITEONLY]] cbrt(f); cbrtf(f); cbrtl(f); @@ -165,72 +165,72 @@ // 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]] -// 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 double @cos(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @cosf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80) [[WRITEONLY]] cosh(f); coshf(f); coshl(f); // NO__ERRNO: declare double @cosh(double) [[READNONE]] // NO__ERRNO: declare float @coshf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @coshl(x86_fp80) [[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 double @cosh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @coshf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80) [[WRITEONLY]] erf(f); erff(f); erfl(f); // NO__ERRNO: declare double @erf(double) [[READNONE]] // NO__ERRNO: declare float @erff(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @erfl(x86_fp80) [[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 double @erf(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @erff(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80) [[WRITEONLY]] erfc(f); erfcf(f); erfcl(f); // NO__ERRNO: declare double @erfc(double) [[READNONE]] // NO__ERRNO: declare float @erfcf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[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 double @erfc(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @erfcf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80) [[WRITEONLY]] exp(f); expf(f); expl(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]] -// 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 double @exp(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @expf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @expl(x86_fp80) [[WRITEONLY]] exp2(f); exp2f(f); exp2l(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]] -// 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 double @exp2(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @exp2f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80) [[WRITEONLY]] expm1(f); expm1f(f); expm1l(f); // NO__ERRNO: declare double @expm1(double) [[READNONE]] // NO__ERRNO: declare float @expm1f(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[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 double @expm1(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @expm1f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80) [[WRITEONLY]] fdim(f,f); fdimf(f,f); fdiml(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]] -// 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 double @fdim(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @fdimf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80, x86_fp80) [[WRITEONLY]] floor(f); floorf(f); floorl(f); @@ -246,9 +246,9 @@ // 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]] -// 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 double @fma(double, double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @fmaf(float, float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) [[WRITEONLY]] // On GNU or Win, fma never sets errno, so we can convert to the intrinsic. @@ -284,18 +284,18 @@ // 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]] -// 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 double @hypot(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @hypotf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80, x86_fp80) [[WRITEONLY]] ilogb(f); ilogbf(f); ilogbl(f); // NO__ERRNO: declare i32 @ilogb(double) [[READNONE]] // NO__ERRNO: declare i32 @ilogbf(float) [[READNONE]] // NO__ERRNO: declare i32 @ilogbl(x86_fp80) [[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 @ilogb(double) [[WRITEONLY]] +// HAS_ERRNO: declare i32 @ilogbf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i32 @ilogbl(x86_fp80) [[WRITEONLY]] lgamma(f); lgammaf(f); lgammal(f); @@ -311,81 +311,81 @@ // NO__ERRNO: declare i64 @llrint(double) [[READNONE]] // NO__ERRNO: declare i64 @llrintf(float) [[READNONE]] // NO__ERRNO: declare i64 @llrintl(x86_fp80) [[READNONE]] -// 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 @llrint(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llrintf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llrintl(x86_fp80) [[WRITEONLY]] llround(f); llroundf(f); llroundl(f); // NO__ERRNO: declare i64 @llround(double) [[READNONE]] // NO__ERRNO: declare i64 @llroundf(float) [[READNONE]] // NO__ERRNO: declare i64 @llroundl(x86_fp80) [[READNONE]] -// 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 @llround(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llroundf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @llroundl(x86_fp80) [[WRITEONLY]] log(f); logf(f); logl(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]] -// 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 double @log(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @logf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @logl(x86_fp80) [[WRITEONLY]] log10(f); log10f(f); log10l(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]] -// 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 double @log10(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log10f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80) [[WRITEONLY]] log1p(f); log1pf(f); log1pl(f); // NO__ERRNO: declare double @log1p(double) [[READNONE]] // NO__ERRNO: declare float @log1pf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[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 double @log1p(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log1pf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80) [[WRITEONLY]] log2(f); log2f(f); log2l(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]] -// 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 double @log2(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @log2f(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80) [[WRITEONLY]] logb(f); logbf(f); logbl(f); // NO__ERRNO: declare double @logb(double) [[READNONE]] // NO__ERRNO: declare float @logbf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @logbl(x86_fp80) [[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 double @logb(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @logbf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80) [[WRITEONLY]] lrint(f); lrintf(f); lrintl(f); // NO__ERRNO: declare i64 @lrint(double) [[READNONE]] // NO__ERRNO: declare i64 @lrintf(float) [[READNONE]] // NO__ERRNO: declare i64 @lrintl(x86_fp80) [[READNONE]] -// 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 @lrint(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lrintf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lrintl(x86_fp80) [[WRITEONLY]] lround(f); lroundf(f); lroundl(f); // NO__ERRNO: declare i64 @lround(double) [[READNONE]] // NO__ERRNO: declare i64 @lroundf(float) [[READNONE]] // NO__ERRNO: declare i64 @lroundl(x86_fp80) [[READNONE]] -// 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 @lround(double) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lroundf(float) [[WRITEONLY]] +// HAS_ERRNO: declare i64 @lroundl(x86_fp80) [[WRITEONLY]] nearbyint(f); nearbyintf(f); nearbyintl(f); @@ -401,27 +401,27 @@ // 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]] -// 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 double @nextafter(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @nextafterf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80, x86_fp80) [[WRITEONLY]] nexttoward(f,f); nexttowardf(f,f);nexttowardl(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]] -// 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 double @nexttoward(double, x86_fp80) [[WRITEONLY]] +// HAS_ERRNO: declare float @nexttowardf(float, x86_fp80) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80, x86_fp80) [[WRITEONLY]] remainder(f,f); remainderf(f,f); remainderl(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]] -// 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 double @remainder(double, double) [[WRITEONLY]] +// HAS_ERRNO: declare float @remainderf(float, float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80, x86_fp80) [[WRITEONLY]] remquo(f,f,i); remquof(f,f,i); remquol(f,f,i); @@ -455,72 +455,72 @@ // 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]] -// 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 double @scalbln(double, i64) [[WRITEONLY]] +// HAS_ERRNO: declare float @scalblnf(float, i64) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80, i64) [[WRITEONLY]] scalbn(f,f); scalbnf(f,f); scalbnl(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]] -// 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 double @scalbn(double, i32) [[WRITEONLY]] +// HAS_ERRNO: declare float @scalbnf(float, i32) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80, i32) [[WRITEONLY]] sin(f); sinf(f); sinl(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]] -// 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 double @sin(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sinf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80) [[WRITEONLY]] sinh(f); sinhf(f); sinhl(f); // NO__ERRNO: declare double @sinh(double) [[READNONE]] // NO__ERRNO: declare float @sinhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[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 double @sinh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sinhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80) [[WRITEONLY]] sqrt(f); sqrtf(f); sqrtl(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]] -// 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 double @sqrt(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @sqrtf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80) [[WRITEONLY]] tan(f); tanf(f); tanl(f); // NO__ERRNO: declare double @tan(double) [[READNONE]] // NO__ERRNO: declare float @tanf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tanl(x86_fp80) [[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 double @tan(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tanf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80) [[WRITEONLY]] tanh(f); tanhf(f); tanhl(f); // NO__ERRNO: declare double @tanh(double) [[READNONE]] // NO__ERRNO: declare float @tanhf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[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 double @tanh(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tanhf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80) [[WRITEONLY]] tgamma(f); tgammaf(f); tgammal(f); // NO__ERRNO: declare double @tgamma(double) [[READNONE]] // NO__ERRNO: declare float @tgammaf(float) [[READNONE]] // NO__ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[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 double @tgamma(double) [[WRITEONLY]] +// HAS_ERRNO: declare float @tgammaf(float) [[WRITEONLY]] +// HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80) [[WRITEONLY]] trunc(f); truncf(f); truncl(f); @@ -538,8 +538,9 @@ // NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } // NO__ERRNO: attributes [[READONLY]] = { {{.*}}readonly{{.*}} } -// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } +// HAS_ERRNO: attributes [[WRITEONLY]] = { nounwind writeonly "correctly{{.*}} } // HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} } +// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind "correctly{{.*}} } // HAS_ERRNO: attributes [[READONLY]] = { {{.*}}readonly{{.*}} } // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} }