diff --git a/clang/test/CodeGen/math-libcalls.c b/clang/test/CodeGen/math-libcalls.c index bf259d7e783bea..d1af31631bb226 100644 --- a/clang/test/CodeGen/math-libcalls.c +++ b/clang/test/CodeGen/math-libcalls.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -S -o - -emit-llvm %s | FileCheck %s --check-prefix=NO__ERRNO // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO +// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -Wno-implicit-function-declaration -w -S -o - -emit-llvm -ffp-exception-behavior=maytrap %s | FileCheck %s --check-prefix=HAS_MAYTRAP // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown-gnu -Wno-implicit-function-declaration -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_GNU // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-windows-msvc -Wno-implicit-function-declaration -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s --check-prefix=HAS_ERRNO_WIN @@ -8,66 +9,87 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { f = fmod(f,f); f = fmodf(f,f); f = fmodl(f,f); -// NO__ERRNO: frem double -// NO__ERRNO: frem float -// NO__ERRNO: frem x86_fp80 -// HAS_ERRNO: declare double @fmod(double noundef, double noundef) [[NOT_READNONE:#[0-9]+]] -// HAS_ERRNO: declare float @fmodf(float noundef, float noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] + // NO__ERRNO: frem double + // NO__ERRNO: frem float + // NO__ERRNO: frem x86_fp80 + // HAS_ERRNO: declare double @fmod(double noundef, double noundef) [[NOT_READNONE:#[0-9]+]] + // HAS_ERRNO: declare float @fmodf(float noundef, float noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare x86_fp80 @fmodl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare double @llvm.experimental.constrained.frem.f64( + // HAS_MAYTRAP: declare float @llvm.experimental.constrained.frem.f32( + // HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.frem.f80( atan2(f,f); atan2f(f,f) ; atan2l(f, f); -// NO__ERRNO: declare double @atan2(double noundef, double noundef) [[READNONE:#[0-9]+]] -// NO__ERRNO: declare float @atan2f(float noundef, float noundef) [[READNONE]] -// NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] -// HAS_ERRNO: declare double @atan2(double noundef, double noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] + // NO__ERRNO: declare double @atan2(double noundef, double noundef) [[READNONE:#[0-9]+]] + // NO__ERRNO: declare float @atan2f(float noundef, float noundef) [[READNONE]] + // NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] + // HAS_ERRNO: declare double @atan2(double noundef, double noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare double @atan2(double noundef, double noundef) [[READNONE:#[0-9]+]] + // HAS_MAYTRAP: declare float @atan2f(float noundef, float noundef) [[READNONE]] + // HAS_MAYTRAP: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] copysign(f,f); copysignf(f,f);copysignl(f,f); -// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]] -// NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]] -// NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] -// HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]] -// HAS_ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]] -// HAS_ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] + // NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]] + // NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]] + // NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] + // HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]] + // HAS_ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]] + // HAS_ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] + // HAS_MAYTRAP: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]] + // HAS_MAYTRAP: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]] + // HAS_MAYTRAP: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] fabs(f); fabsf(f); fabsl(f); -// NO__ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]] -// NO__ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]] -// NO__ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]] -// HAS_ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]] -// HAS_ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]] -// HAS_ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]] + // NO__ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]] + // NO__ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]] + // NO__ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]] + // HAS_ERRNO: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]] + // HAS_ERRNO: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]] + // HAS_ERRNO: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]] + // HAS_MAYTRAP: declare double @llvm.fabs.f64(double) [[READNONE_INTRINSIC]] + // HAS_MAYTRAP: declare float @llvm.fabs.f32(float) [[READNONE_INTRINSIC]] + // HAS_MAYTRAP: declare x86_fp80 @llvm.fabs.f80(x86_fp80) [[READNONE_INTRINSIC]] frexp(f,i); frexpf(f,i); frexpl(f,i); -// NO__ERRNO: declare double @frexp(double noundef, i32* noundef) [[NOT_READNONE:#[0-9]+]] -// NO__ERRNO: declare float @frexpf(float noundef, i32* noundef) [[NOT_READNONE]] -// NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare double @frexp(double noundef, i32* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare float @frexpf(float noundef, i32* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] + // NO__ERRNO: declare double @frexp(double noundef, i32* noundef) [[NOT_READNONE:#[0-9]+]] + // NO__ERRNO: declare float @frexpf(float noundef, i32* noundef) [[NOT_READNONE]] + // NO__ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare double @frexp(double noundef, i32* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare float @frexpf(float noundef, i32* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare double @frexp(double noundef, i32* noundef) [[NOT_READNONE:#[0-9]+]] + // HAS_MAYTRAP: declare float @frexpf(float noundef, i32* noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare x86_fp80 @frexpl(x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] ldexp(f,f); ldexpf(f,f); ldexpl(f,f); -// NO__ERRNO: declare double @ldexp(double noundef, i32 noundef) [[READNONE]] -// NO__ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[READNONE]] -// NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[READNONE]] -// HAS_ERRNO: declare double @ldexp(double noundef, i32 noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]] + // NO__ERRNO: declare double @ldexp(double noundef, i32 noundef) [[READNONE]] + // NO__ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[READNONE]] + // NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[READNONE]] + // HAS_ERRNO: declare double @ldexp(double noundef, i32 noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare double @ldexp(double noundef, i32 noundef) [[READNONE]] + // HAS_MAYTRAP: declare float @ldexpf(float noundef, i32 noundef) [[READNONE]] + // HAS_MAYTRAP: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[READNONE]] modf(f,d); modff(f,fp); modfl(f,l); -// NO__ERRNO: declare double @modf(double noundef, double* noundef) [[NOT_READNONE]] -// NO__ERRNO: declare float @modff(float noundef, float* noundef) [[NOT_READNONE]] -// NO__ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, x86_fp80* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare double @modf(double noundef, double* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare float @modff(float noundef, float* noundef) [[NOT_READNONE]] -// HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, x86_fp80* noundef) [[NOT_READNONE]] + // NO__ERRNO: declare double @modf(double noundef, double* noundef) [[NOT_READNONE]] + // NO__ERRNO: declare float @modff(float noundef, float* noundef) [[NOT_READNONE]] + // NO__ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, x86_fp80* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare double @modf(double noundef, double* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare float @modff(float noundef, float* noundef) [[NOT_READNONE]] + // HAS_ERRNO: declare x86_fp80 @modfl(x86_fp80 noundef, x86_fp80* noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare double @modf(double noundef, double* noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare float @modff(float noundef, float* noundef) [[NOT_READNONE]] + // HAS_MAYTRAP: declare x86_fp80 @modfl(x86_fp80 noundef, x86_fp80* noundef) [[NOT_READNONE]] nan(c); nanf(c); nanl(c); @@ -77,6 +99,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @nan(i8* noundef) [[READONLY:#[0-9]+]] // HAS_ERRNO: declare float @nanf(i8* noundef) [[READONLY]] // HAS_ERRNO: declare x86_fp80 @nanl(i8* noundef) [[READONLY]] +// HAS_MAYTRAP: declare double @nan(i8* noundef) [[READONLY:#[0-9]+]] +// HAS_MAYTRAP: declare float @nanf(i8* noundef) [[READONLY]] +// HAS_MAYTRAP: declare x86_fp80 @nanl(i8* noundef) [[READONLY]] pow(f,f); powf(f,f); powl(f,f); @@ -86,6 +111,10 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @pow(double noundef, double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @powf(float noundef, float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @powl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.pow.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.pow.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.pow.f80({{.*}}) + /* math */ acos(f); acosf(f); acosl(f); @@ -96,6 +125,10 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @acos(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @acosf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @acosl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @acos(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @acosf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @acosl(x86_fp80 noundef) [[READNONE]] + acosh(f); acoshf(f); acoshl(f); @@ -105,6 +138,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @acosh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @acoshf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @acoshl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @acosh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @acoshf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @acoshl(x86_fp80 noundef) [[READNONE]] asin(f); asinf(f); asinl(f); @@ -114,6 +150,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @asin(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @asinf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @asinl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @asin(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @asinf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @asinl(x86_fp80 noundef) [[READNONE]] asinh(f); asinhf(f); asinhl(f); @@ -123,6 +162,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @asinh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @asinhf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @asinhl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @asinh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @asinhf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @asinhl(x86_fp80 noundef) [[READNONE]] atan(f); atanf(f); atanl(f); @@ -132,6 +174,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @atan(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @atanf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @atanl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @atan(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @atanf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @atanl(x86_fp80 noundef) [[READNONE]] atanh(f); atanhf(f); atanhl(f); @@ -141,6 +186,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @atanh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @atanhf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @atanhl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @atanh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @atanhf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @atanhl(x86_fp80 noundef) [[READNONE]] cbrt(f); cbrtf(f); cbrtl(f); @@ -150,6 +198,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @cbrt(double noundef) [[READNONE:#[0-9]+]] // HAS_ERRNO: declare float @cbrtf(float noundef) [[READNONE]] // HAS_ERRNO: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[READNONE]] +// HAS_MAYTRAP: declare double @cbrt(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @cbrtf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @cbrtl(x86_fp80 noundef) [[READNONE]] ceil(f); ceilf(f); ceill(f); @@ -159,6 +210,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.ceil.f64(double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.ceil.f32(float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.ceil.f80(x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.ceil.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.ceil.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.ceil.f80( cos(f); cosf(f); cosl(f); @@ -168,6 +222,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @cos(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @cosf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @cosl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.cos.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.cos.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.cos.f80( cosh(f); coshf(f); coshl(f); @@ -177,6 +234,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @cosh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @coshf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @coshl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @cosh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @coshf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @coshl(x86_fp80 noundef) [[READNONE]] erf(f); erff(f); erfl(f); @@ -186,6 +246,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @erf(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @erff(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @erfl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @erf(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @erff(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @erfl(x86_fp80 noundef) [[READNONE]] erfc(f); erfcf(f); erfcl(f); @@ -195,6 +258,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @erfc(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @erfcf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @erfcl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @erfc(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @erfcf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @erfcl(x86_fp80 noundef) [[READNONE]] exp(f); expf(f); expl(f); @@ -204,6 +270,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @exp(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @expf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @expl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.exp.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.exp.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.exp.f80( exp2(f); exp2f(f); exp2l(f); @@ -213,6 +282,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @exp2(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @exp2f(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @exp2l(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.exp2.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.exp2.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.exp2.f80( expm1(f); expm1f(f); expm1l(f); @@ -222,6 +294,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @expm1(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @expm1f(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @expm1l(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @expm1(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @expm1f(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @expm1l(x86_fp80 noundef) [[READNONE]] fdim(f,f); fdimf(f,f); fdiml(f,f); @@ -231,6 +306,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @fdim(double noundef, double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @fdimf(float noundef, float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @fdim(double noundef, double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @fdimf(float noundef, float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @fdiml(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] floor(f); floorf(f); floorl(f); @@ -240,6 +318,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.floor.f64(double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.floor.f32(float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.floor.f80(x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.floor.f64 +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.floor.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.floor.f80( fma(f,f,f); fmaf(f,f,f); fmal(f,f,f); @@ -261,6 +342,10 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // Long double is just double on win, so no f80 use/declaration. // HAS_ERRNO_WIN-NOT: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.fma.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.fma.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.fma.f80( + fmax(f,f); fmaxf(f,f); fmaxl(f,f); // NO__ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]] @@ -269,6 +354,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.maxnum.f64(double, double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.maxnum.f32(float, float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.maxnum.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.maxnum.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.maxnum.f80( fmin(f,f); fminf(f,f); fminl(f,f); @@ -278,6 +366,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.minnum.f64(double, double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.minnum.f32(float, float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.minnum.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.minnum.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.minnum.f80( hypot(f,f); hypotf(f,f); hypotl(f,f); @@ -287,6 +378,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @hypot(double noundef, double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @hypotf(float noundef, float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @hypot(double noundef, double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @hypotf(float noundef, float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @hypotl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] ilogb(f); ilogbf(f); ilogbl(f); @@ -296,6 +390,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare i32 @ilogb(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i32 @ilogbf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i32 @ilogbl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare i32 @ilogb(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare i32 @ilogbf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare i32 @ilogbl(x86_fp80 noundef) [[READNONE]] lgamma(f); lgammaf(f); lgammal(f); @@ -305,6 +402,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @lgamma(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @lgammaf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @lgamma(double noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare float @lgammaf(float noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @lgammal(x86_fp80 noundef) [[NOT_READNONE]] llrint(f); llrintf(f); llrintl(f); @@ -314,6 +414,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare i64 @llrint(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @llrintf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @llrintl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f64( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f32( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llrint.i64.f80( llround(f); llroundf(f); llroundl(f); @@ -323,6 +426,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare i64 @llround(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @llroundf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @llroundl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f64( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f32( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.llround.i64.f80( log(f); logf(f); logl(f); @@ -332,6 +438,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @log(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @logf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @logl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.log.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.log.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log.f80( log10(f); log10f(f); log10l(f); @@ -341,6 +450,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @log10(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @log10f(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @log10l(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.log10.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.log10.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log10.f80( log1p(f); log1pf(f); log1pl(f); @@ -350,6 +462,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @log1p(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @log1pf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @log1pl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @log1p(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @log1pf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @log1pl(x86_fp80 noundef) [[READNONE]] log2(f); log2f(f); log2l(f); @@ -359,6 +474,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @log2(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @log2f(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @log2l(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.log2.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.log2.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.log2.f80( logb(f); logbf(f); logbl(f); @@ -368,6 +486,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @logb(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @logbf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @logbl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @logb(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @logbf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @logbl(x86_fp80 noundef) [[READNONE]] lrint(f); lrintf(f); lrintl(f); @@ -377,6 +498,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare i64 @lrint(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @lrintf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @lrintl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f64( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f32( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lrint.i64.f80( lround(f); lroundf(f); lroundl(f); @@ -386,6 +510,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare i64 @lround(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @lroundf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare i64 @lroundl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f64( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f32( +// HAS_MAYTRAP: declare i64 @llvm.experimental.constrained.lround.i64.f80( nearbyint(f); nearbyintf(f); nearbyintl(f); @@ -395,6 +522,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.nearbyint.f64(double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.nearbyint.f32(float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.nearbyint.f80(x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.nearbyint.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.nearbyint.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.nearbyint.f80( nextafter(f,f); nextafterf(f,f); nextafterl(f,f); @@ -404,6 +534,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @nextafter(double noundef, double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @nextafterf(float noundef, float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @nextafter(double noundef, double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @nextafterf(float noundef, float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @nextafterl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] nexttoward(f,f); nexttowardf(f,f);nexttowardl(f,f); @@ -413,6 +546,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @nexttoward(double noundef, x86_fp80 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @nexttoward(double noundef, x86_fp80 noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @nexttowardf(float noundef, x86_fp80 noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @nexttowardl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] remainder(f,f); remainderf(f,f); remainderl(f,f); @@ -422,6 +558,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @remainder(double noundef, double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @remainderf(float noundef, float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @remainder(double noundef, double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @remainderf(float noundef, float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @remainderl(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]] remquo(f,f,i); remquof(f,f,i); remquol(f,f,i); @@ -431,6 +570,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @remquo(double noundef, double noundef, i32* noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @remquof(float noundef, float noundef, i32* noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @remquol(x86_fp80 noundef, x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @remquo(double noundef, double noundef, i32* noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare float @remquof(float noundef, float noundef, i32* noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @remquol(x86_fp80 noundef, x86_fp80 noundef, i32* noundef) [[NOT_READNONE]] rint(f); rintf(f); rintl(f); @@ -440,6 +582,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.rint.f64(double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.rint.f32(float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.rint.f80(x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.rint.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.rint.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.rint.f80( round(f); roundf(f); roundl(f); @@ -449,6 +594,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @llvm.round.f64(double) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare float @llvm.round.f32(float) [[READNONE_INTRINSIC]] // HAS_ERRNO: declare x86_fp80 @llvm.round.f80(x86_fp80) [[READNONE_INTRINSIC]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.round.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.round.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.round.f80( scalbln(f,f); scalblnf(f,f); scalblnl(f,f); @@ -458,6 +606,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @scalbln(double noundef, i64 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @scalblnf(float noundef, i64 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @scalbln(double noundef, i64 noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @scalblnf(float noundef, i64 noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @scalblnl(x86_fp80 noundef, i64 noundef) [[READNONE]] scalbn(f,f); scalbnf(f,f); scalbnl(f,f); @@ -467,6 +618,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @scalbn(double noundef, i32 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @scalbnf(float noundef, i32 noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @scalbn(double noundef, i32 noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @scalbnf(float noundef, i32 noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @scalbnl(x86_fp80 noundef, i32 noundef) [[READNONE]] sin(f); sinf(f); sinl(f); @@ -476,6 +630,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @sin(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @sinf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @sinl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.sin.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.sin.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.sin.f80( sinh(f); sinhf(f); sinhl(f); @@ -485,6 +642,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @sinh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @sinhf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @sinhl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @sinh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @sinhf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @sinhl(x86_fp80 noundef) [[READNONE]] sqrt(f); sqrtf(f); sqrtl(f); @@ -494,6 +654,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @sqrt(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @sqrtf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @sqrtl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @llvm.experimental.constrained.sqrt.f64( +// HAS_MAYTRAP: declare float @llvm.experimental.constrained.sqrt.f32( +// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.sqrt.f80( tan(f); tanf(f); tanl(f); @@ -503,6 +666,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @tan(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @tanf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @tanl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @tan(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @tanf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @tanl(x86_fp80 noundef) [[READNONE]] tanh(f); tanhf(f); tanhl(f); @@ -512,6 +678,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @tanh(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @tanhf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @tanhl(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @tanh(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @tanhf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @tanhl(x86_fp80 noundef) [[READNONE]] tgamma(f); tgammaf(f); tgammal(f); @@ -521,6 +690,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: declare double @tgamma(double noundef) [[NOT_READNONE]] // HAS_ERRNO: declare float @tgammaf(float noundef) [[NOT_READNONE]] // HAS_ERRNO: declare x86_fp80 @tgammal(x86_fp80 noundef) [[NOT_READNONE]] +// HAS_MAYTRAP: declare double @tgamma(double noundef) [[READNONE]] +// HAS_MAYTRAP: declare float @tgammaf(float noundef) [[READNONE]] +// HAS_MAYTRAP: declare x86_fp80 @tgammal(x86_fp80 noundef) [[READNONE]] trunc(f); truncf(f); truncl(f); @@ -542,5 +714,8 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) { // HAS_ERRNO: attributes [[READONLY]] = { {{.*}}readonly{{.*}} } // HAS_ERRNO: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } +// HAS_MAYTRAP: attributes [[READNONE]] = { {{.*}}readnone{{.*}} } +// HAS_MAYTRAP: attributes [[NOT_READNONE]] = { nounwind {{.*}} } + // HAS_ERRNO_GNU: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} } // HAS_ERRNO_WIN: attributes [[READNONE_INTRINSIC]] = { {{.*}}readnone{{.*}} }