[SimplifyLibCalls] Remove useless bits of this tests.
[oota-llvm.git] / test / Transforms / InstCombine / win-math.ll
index 367e5b80721c5adf3bc0a6f4a152631b110d4f73..e6e79e2b84a028242563afb196208fe564fa22ad 100644 (file)
@@ -9,7 +9,7 @@
 
 declare double @acos(double %x)
 define float @float_acos(float %x) nounwind readnone {
-; WIN32: @float_acos
+; WIN32-LABEL: @float_acos(
 ; WIN32-NOT: float @acosf
 ; WIN32: double @acos
     %1 = fpext float %x to double
@@ -20,7 +20,7 @@ define float @float_acos(float %x) nounwind readnone {
 
 declare double @asin(double %x)
 define float @float_asin(float %x) nounwind readnone {
-; WIN32: @float_asin
+; WIN32-LABEL: @float_asin(
 ; WIN32-NOT: float @asinf
 ; WIN32: double @asin
     %1 = fpext float %x to double
@@ -31,7 +31,7 @@ define float @float_asin(float %x) nounwind readnone {
 
 declare double @atan(double %x)
 define float @float_atan(float %x) nounwind readnone {
-; WIN32: @float_atan
+; WIN32-LABEL: @float_atan(
 ; WIN32-NOT: float @atanf
 ; WIN32: double @atan
     %1 = fpext float %x to double
@@ -42,7 +42,7 @@ define float @float_atan(float %x) nounwind readnone {
 
 declare double @atan2(double %x, double %y)
 define float @float_atan2(float %x, float %y) nounwind readnone {
-; WIN32: @float_atan2
+; WIN32-LABEL: @float_atan2(
 ; WIN32-NOT: float @atan2f
 ; WIN32: double @atan2
     %1 = fpext float %x to double
@@ -54,16 +54,16 @@ define float @float_atan2(float %x, float %y) nounwind readnone {
 
 declare double @ceil(double %x)
 define float @float_ceil(float %x) nounwind readnone {
-; WIN32: @float_ceil
+; WIN32-LABEL: @float_ceil(
 ; WIN32-NOT: float @ceilf
 ; WIN32: double @ceil
-; WIN64: @float_ceil
+; WIN64-LABEL: @float_ceil(
 ; WIN64: float @ceilf
 ; WIN64-NOT: double @ceil
-; MINGW32: @float_ceil
+; MINGW32-LABEL: @float_ceil(
 ; MINGW32: float @ceilf
 ; MINGW32-NOT: double @ceil
-; MINGW64: @float_ceil
+; MINGW64-LABEL: @float_ceil(
 ; MINGW64: float @ceilf
 ; MINGW64-NOT: double @ceil
     %1 = fpext float %x to double
@@ -74,7 +74,7 @@ define float @float_ceil(float %x) nounwind readnone {
 
 declare double @_copysign(double %x)
 define float @float_copysign(float %x) nounwind readnone {
-; WIN32: @float_copysign
+; WIN32-LABEL: @float_copysign(
 ; WIN32-NOT: float @copysignf
 ; WIN32-NOT: float @_copysignf
 ; WIN32: double @_copysign
@@ -86,7 +86,7 @@ define float @float_copysign(float %x) nounwind readnone {
 
 declare double @cos(double %x)
 define float @float_cos(float %x) nounwind readnone {
-; WIN32: @float_cos
+; WIN32-LABEL: @float_cos(
 ; WIN32-NOT: float @cosf
 ; WIN32: double @cos
     %1 = fpext float %x to double
@@ -97,7 +97,7 @@ define float @float_cos(float %x) nounwind readnone {
 
 declare double @cosh(double %x)
 define float @float_cosh(float %x) nounwind readnone {
-; WIN32: @float_cosh
+; WIN32-LABEL: @float_cosh(
 ; WIN32-NOT: float @coshf
 ; WIN32: double @cosh
     %1 = fpext float %x to double
@@ -108,7 +108,7 @@ define float @float_cosh(float %x) nounwind readnone {
 
 declare double @exp(double %x, double %y)
 define float @float_exp(float %x, float %y) nounwind readnone {
-; WIN32: @float_exp
+; WIN32-LABEL: @float_exp(
 ; WIN32-NOT: float @expf
 ; WIN32: double @exp
     %1 = fpext float %x to double
@@ -120,10 +120,10 @@ define float @float_exp(float %x, float %y) nounwind readnone {
 
 declare double @fabs(double %x, double %y)
 define float @float_fabs(float %x, float %y) nounwind readnone {
-; WIN32: @float_fabs
+; WIN32-LABEL: @float_fabs(
 ; WIN32-NOT: float @fabsf
 ; WIN32: double @fabs
-; WIN64: @float_fabs
+; WIN64-LABEL: @float_fabs(
 ; WIN64-NOT: float @fabsf
 ; WIN64: double @fabs
     %1 = fpext float %x to double
@@ -135,16 +135,16 @@ define float @float_fabs(float %x, float %y) nounwind readnone {
 
 declare double @floor(double %x)
 define float @float_floor(float %x) nounwind readnone {
-; WIN32: @float_floor
+; WIN32-LABEL: @float_floor(
 ; WIN32-NOT: float @floorf
 ; WIN32: double @floor
-; WIN64: @float_floor
+; WIN64-LABEL: @float_floor(
 ; WIN64: float @floorf
 ; WIN64-NOT: double @floor
-; MINGW32: @float_floor
+; MINGW32-LABEL: @float_floor(
 ; MINGW32: float @floorf
 ; MINGW32-NOT: double @floor
-; MINGW64: @float_floor
+; MINGW64-LABEL: @float_floor(
 ; MINGW64: float @floorf
 ; MINGW64-NOT: double @floor
     %1 = fpext float %x to double
@@ -155,7 +155,7 @@ define float @float_floor(float %x) nounwind readnone {
 
 declare double @fmod(double %x, double %y)
 define float @float_fmod(float %x, float %y) nounwind readnone {
-; WIN32: @float_fmod
+; WIN32-LABEL: @float_fmod(
 ; WIN32-NOT: float @fmodf
 ; WIN32: double @fmod
     %1 = fpext float %x to double
@@ -167,7 +167,7 @@ define float @float_fmod(float %x, float %y) nounwind readnone {
 
 declare double @log(double %x)
 define float @float_log(float %x) nounwind readnone {
-; WIN32: @float_log
+; WIN32-LABEL: @float_log(
 ; WIN32-NOT: float @logf
 ; WIN32: double @log
     %1 = fpext float %x to double
@@ -178,7 +178,7 @@ define float @float_log(float %x) nounwind readnone {
 
 declare double @pow(double %x, double %y)
 define float @float_pow(float %x, float %y) nounwind readnone {
-; WIN32: @float_pow
+; WIN32-LABEL: @float_pow(
 ; WIN32-NOT: float @powf
 ; WIN32: double @pow
     %1 = fpext float %x to double
@@ -190,7 +190,7 @@ define float @float_pow(float %x, float %y) nounwind readnone {
 
 declare double @sin(double %x)
 define float @float_sin(float %x) nounwind readnone {
-; WIN32: @float_sin
+; WIN32-LABEL: @float_sin(
 ; WIN32-NOT: float @sinf
 ; WIN32: double @sin
     %1 = fpext float %x to double
@@ -201,7 +201,7 @@ define float @float_sin(float %x) nounwind readnone {
 
 declare double @sinh(double %x)
 define float @float_sinh(float %x) nounwind readnone {
-; WIN32: @float_sinh
+; WIN32-LABEL: @float_sinh(
 ; WIN32-NOT: float @sinhf
 ; WIN32: double @sinh
     %1 = fpext float %x to double
@@ -212,16 +212,16 @@ define float @float_sinh(float %x) nounwind readnone {
 
 declare double @sqrt(double %x)
 define float @float_sqrt(float %x) nounwind readnone {
-; WIN32: @float_sqrt
+; WIN32-LABEL: @float_sqrt(
 ; WIN32-NOT: float @sqrtf
 ; WIN32: double @sqrt
-; WIN64: @float_sqrt
+; WIN64-LABEL: @float_sqrt(
 ; WIN64: float @sqrtf
 ; WIN64-NOT: double @sqrt
-; MINGW32: @float_sqrt
+; MINGW32-LABEL: @float_sqrt(
 ; MINGW32: float @sqrtf
 ; MINGW32-NOT: double @sqrt
-; MINGW64: @float_sqrt
+; MINGW64-LABEL: @float_sqrt(
 ; MINGW64: float @sqrtf
 ; MINGW64-NOT: double @sqrt
     %1 = fpext float %x to double
@@ -232,7 +232,7 @@ define float @float_sqrt(float %x) nounwind readnone {
 
 declare double @tan(double %x)
 define float @float_tan(float %x) nounwind readnone {
-; WIN32: @float_tan
+; WIN32-LABEL: @float_tan(
 ; WIN32-NOT: float @tanf
 ; WIN32: double @tan
     %1 = fpext float %x to double
@@ -243,7 +243,7 @@ define float @float_tan(float %x) nounwind readnone {
 
 declare double @tanh(double %x)
 define float @float_tanh(float %x) nounwind readnone {
-; WIN32: @float_tanh
+; WIN32-LABEL: @float_tanh(
 ; WIN32-NOT: float @tanhf
 ; WIN32: double @tanh
     %1 = fpext float %x to double
@@ -255,16 +255,16 @@ define float @float_tanh(float %x) nounwind readnone {
 ; win32 does not have round; mingw32 does
 declare double @round(double %x)
 define float @float_round(float %x) nounwind readnone {
-; WIN32: @float_round
+; WIN32-LABEL: @float_round(
 ; WIN32-NOT: float @roundf
 ; WIN32: double @round
-; WIN64: @float_round
+; WIN64-LABEL: @float_round(
 ; WIN64-NOT: float @roundf
 ; WIN64: double @round
-; MINGW32: @float_round
+; MINGW32-LABEL: @float_round(
 ; MINGW32: float @roundf
 ; MINGW32-NOT: double @round
-; MINGW64: @float_round
+; MINGW64-LABEL: @float_round(
 ; MINGW64: float @roundf
 ; MINGW64-NOT: double @round
     %1 = fpext float %x to double
@@ -273,3 +273,23 @@ define float @float_round(float %x) nounwind readnone {
     ret float %3
 }
 
+declare float @powf(float, float)
+; win32 lacks sqrtf&fabsf, win64 lacks fabsf
+define float @float_powsqrt(float %x) nounwind readnone {
+; WIN32-LABEL: @float_powsqrt(
+; WIN32-NOT: float @sqrtf
+; WIN32: float @powf
+; WIN64-LABEL: @float_powsqrt(
+; WIN64-NOT: float @sqrtf
+; WIN64: float @powf
+; MINGW32-LABEL: @float_powsqrt(
+; MINGW32: float @sqrtf
+; MINGW32: float @fabsf
+; MINGW32-NOT: float @powf
+; MINGW64-LABEL: @float_powsqrt(
+; MINGW64: float @sqrtf
+; MINGW64: float @fabsf
+; MINGW64-NOT: float @powf
+    %1 = call float @powf(float %x, float 0.5)
+    ret float %1
+}