brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 6b73c6e Raw
112 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=dce -S | FileCheck %s3 4declare double @acos(double) nounwind willreturn5declare double @asin(double) nounwind willreturn6declare double @atan(double) nounwind willreturn7declare double @atan2(double, double) nounwind willreturn8declare double @ceil(double) nounwind willreturn9declare double @cos(double) nounwind willreturn10declare double @cosh(double) nounwind willreturn11declare double @exp(double) nounwind willreturn12declare double @exp2(double) nounwind willreturn13declare double @fabs(double) nounwind willreturn14declare double @floor(double) nounwind willreturn15declare double @fmod(double, double) nounwind willreturn16declare double @log(double) nounwind willreturn17declare double @log10(double) nounwind willreturn18declare double @pow(double, double) nounwind willreturn19declare double @sin(double) nounwind willreturn20declare double @sinh(double) nounwind willreturn21declare double @sqrt(double) nounwind willreturn22declare double @tan(double) nounwind willreturn23declare double @tanh(double) nounwind willreturn24 25declare float @acosf(float) nounwind willreturn26declare float @asinf(float) nounwind willreturn27declare float @atanf(float) nounwind willreturn28declare float @atan2f(float, float) nounwind willreturn29declare float @ceilf(float) nounwind willreturn30declare float @cosf(float) nounwind willreturn31declare float @coshf(float) nounwind willreturn32declare float @expf(float) nounwind willreturn33declare float @exp2f(float) nounwind willreturn34declare float @fabsf(float) nounwind willreturn35declare float @floorf(float) nounwind willreturn36declare float @fmodf(float, float) nounwind willreturn37declare float @logf(float) nounwind willreturn38declare float @log10f(float) nounwind willreturn willreturn39declare float @powf(float, float) nounwind willreturn40declare float @sinf(float) nounwind willreturn41declare float @sinhf(float) nounwind willreturn42declare float @sqrtf(float) nounwind willreturn43declare float @tanf(float) nounwind willreturn44declare float @tanhf(float) nounwind willreturn45 46define void @T() {47; CHECK-LABEL: @T(48; CHECK-NEXT:  entry:49; CHECK-NEXT:    [[LOG1:%.*]] = call double @log(double 0.000000e+00)50; CHECK-NEXT:    [[LOG2:%.*]] = call double @log(double -1.000000e+00)51; CHECK-NEXT:    [[EXP2:%.*]] = call double @exp(double 1.000000e+03)52; CHECK-NEXT:    [[COS2:%.*]] = call double @cos(double 0x7FF0000000000000)53; CHECK-NEXT:    [[COS3:%.*]] = call double @cos(double 0.000000e+00) [[ATTR2:#.*]]54; CHECK-NEXT:    [[FMOD2:%.*]] = call double @fmod(double 0x7FF0000000000000, double 1.000000e+00)55; CHECK-NEXT:    ret void56;57entry:58 59; log(0) produces a pole error60  %log1 = call double @log(double 0.000000e+00)61 62; log(-1) produces a domain error63  %log2 = call double @log(double -1.000000e+00)64 65; log(1) is 066  %log3 = call double @log(double 1.000000e+00)67 68; exp(100) is roughly 2.6e+4369  %exp1 = call double @exp(double 1.000000e+02)70 71; exp(1000) is a range error72  %exp2 = call double @exp(double 1.000000e+03)73 74; cos(0) is 175  %cos1 = call double @cos(double 0.000000e+00)76 77; cos(inf) is a domain error78  %cos2 = call double @cos(double 0x7FF0000000000000)79 80; cos(0) nobuiltin may have side effects81  %cos3 = call double @cos(double 0.000000e+00) nobuiltin82 83; pow(0, 1) is 084  %pow1 = call double @pow(double 0x7FF0000000000000, double 1.000000e+00)85 86; pow(0, -1) is a pole error87; FIXME: It fails on mingw host. Suppress checking.88; %pow2 = call double @pow(double 0.000000e+00, double -1.000000e+00)89 90; fmod(inf, nan) is nan91  %fmod1 = call double @fmod(double 0x7FF0000000000000, double 0x7FF0000000000001)92 93; fmod(inf, 1) is a domain error94  %fmod2 = call double @fmod(double 0x7FF0000000000000, double 1.000000e+00)95 96  ret void97}98 99define void @Tstrict() strictfp {100; CHECK-LABEL: @Tstrict(101; CHECK-NEXT:  entry:102; CHECK-NEXT:    [[COS4:%.*]] = call double @cos(double 1.000000e+00) [[ATTR1:#.*]]103; CHECK-NEXT:    ret void104;105entry:106 107; cos(1) strictfp sets FP status flags108  %cos4 = call double @cos(double 1.000000e+00) strictfp109 110  ret void111}112