1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -early-cse -earlycse-debug-hash -S -o - %s | FileCheck %s 3 4declare double @acos(double) 5define double @f_acos() { 6; CHECK-LABEL: @f_acos( 7; CHECK-NEXT: ret double 0.000000e+00 8; 9 %res = tail call fast double @acos(double 1.0) 10 ret double %res 11} 12 13declare float @asinf(float) 14define float @f_asinf() { 15; CHECK-LABEL: @f_asinf( 16; CHECK-NEXT: ret float 0x3FF921FB{{.+}} 17; 18 %res = tail call fast float @asinf(float 1.0) 19 ret float %res 20} 21 22declare double @atan(double) 23define double @f_atan() { 24; CHECK-LABEL: @f_atan( 25; CHECK-NEXT: [[RES:%.*]] = tail call fast double @atan(double 1.000000e+00) 26; CHECK-NEXT: ret double 0x3FE921FB 27; 28 %res = tail call fast double @atan(double 1.0) 29 ret double %res 30} 31 32declare float @cosf(float) 33define float @f_cosf() { 34; CHECK-LABEL: @f_cosf( 35; CHECK-NEXT: ret float 0x3FE14A2{{.+}} 36; 37 %res = tail call fast float @cosf(float 1.0) 38 ret float %res 39} 40 41declare float @llvm.cos.f32(float) 42define float @i_cosf() { 43; CHECK-LABEL: @i_cosf( 44; CHECK-NEXT: ret float 0x3FE14A2 45; 46 %res = tail call fast float @llvm.cos.f32(float 1.0) 47 ret float %res 48} 49 50declare double @cosh(double) 51define double @f_cosh() { 52; CHECK-LABEL: @f_cosh( 53; CHECK-NEXT: ret double 0x3FF8B075{{.+}} 54; 55 %res = tail call fast double @cosh(double 1.0) 56 ret double %res 57} 58 59declare float @expf(float) 60define float @f_expf() { 61; CHECK-LABEL: @f_expf( 62; CHECK-NEXT: ret float 0x4005BF0A{{.+}} 63; 64 %res = tail call fast float @expf(float 1.0) 65 ret float %res 66} 67 68declare float @llvm.exp.f32(float) 69define float @i_expf() { 70; CHECK-LABEL: @i_expf( 71; CHECK-NEXT: ret float 0x4005BF0A{{.+}} 72; 73 %res = tail call fast float @llvm.exp.f32(float 1.0) 74 ret float %res 75} 76 77declare double @exp2(double) 78define double @f_exp2() { 79; CHECK-LABEL: @f_exp2( 80; CHECK-NEXT: ret double 2.000000e+00 81; 82 %res = tail call fast double @exp2(double 1.0) 83 ret double %res 84} 85 86declare double @llvm.exp2.f64(double) 87define double @i_exp2() { 88; CHECK-LABEL: @i_exp2( 89; CHECK-NEXT: ret double 2.000000e+00 90; 91 %res = tail call fast double @llvm.exp2.f64(double 1.0) 92 ret double %res 93} 94 95; FIXME: exp10() is not widely supported. 96declare float @exp10f(float) 97define float @f_exp10f() { 98; CHECK-LABEL: @f_exp10f( 99; CHECK-NEXT: [[RES:%.*]] = tail call float @exp10f(float 1.000000e+00) 100; CHECK-NEXT: ret float [[RES]] 101; 102 %res = tail call float @exp10f(float 1.0) 103 ret float %res 104} 105 106declare double @log(double) 107define double @f_log() { 108; CHECK-LABEL: @f_log( 109; CHECK-NEXT: ret double 0.000000e+00 110; 111 %res = tail call fast double @log(double 1.0) 112 ret double %res 113} 114 115declare double @llvm.log.f64(double) 116define double @i_log() { 117; CHECK-LABEL: @i_log( 118; CHECK-NEXT: ret double 0.000000e+00 119; 120 %res = tail call fast double @llvm.log.f64(double 1.0) 121 ret double %res 122} 123 124declare float @log2f(float) 125define float @f_log2f() { 126; CHECK-LABEL: @f_log2f( 127; CHECK-NEXT: ret float 0.000000e+00 128; 129 %res = tail call fast float @log2f(float 1.0) 130 ret float %res 131} 132 133declare float @llvm.log2.f32(float) 134define float @i_log2f() { 135; CHECK-LABEL: @i_log2f( 136; CHECK-NEXT: ret float 0.000000e+00 137; 138 %res = tail call fast float @llvm.log2.f32(float 1.0) 139 ret float %res 140} 141 142declare double @log10(double) 143define double @f_log10() { 144; CHECK-LABEL: @f_log10( 145; CHECK-NEXT: ret double 0.000000e+00 146; 147 %res = tail call fast double @log10(double 1.0) 148 ret double %res 149} 150 151declare float @sinf(float) 152define float @f_sinf() { 153; CHECK-LABEL: @f_sinf( 154; CHECK-NEXT: ret float 0x3FEAED54{{.+}} 155; 156 %res = tail call fast float @sinf(float 1.0) 157 ret float %res 158} 159 160declare double @sinh(double) 161define double @f_sinh() { 162; CHECK-LABEL: @f_sinh( 163; CHECK-NEXT: ret double 0x3FF2CD9F{{.+}} 164; 165 %res = tail call fast double @sinh(double 1.0) 166 ret double %res 167} 168 169declare float @sqrtf(float) 170define float @f_sqrtf() { 171; CHECK-LABEL: @f_sqrtf( 172; CHECK-NEXT: ret float 1.000000e+00 173; 174 %res = tail call fast float @sqrtf(float 1.0) 175 ret float %res 176} 177 178declare double @tan(double) 179define double @f_tan() { 180; CHECK-LABEL: @f_tan( 181; CHECK-NEXT: ret double 0x3FF8EB24{{.+}} 182; 183 %res = tail call fast double @tan(double 1.0) 184 ret double %res 185} 186 187declare float @tanhf(float) 188define float @f_tanhf() { 189; CHECK-LABEL: @f_tanhf( 190; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00) 191; CHECK-NEXT: ret float 0x3FE85EFA{{.+}} 192; 193 %res = tail call fast float @tanhf(float 1.0) 194 ret float %res 195} 196