• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s
2
3;; SQRT
4declare float @llvm.sqrt.f32(float)
5
6declare double @llvm.sqrt.f64(double)
7
8define double @test_sqrt(float %F) {
9        %G = call float @llvm.sqrt.f32( float %F )              ; <float> [#uses=1]
10        %H = fpext float %G to double           ; <double> [#uses=1]
11        %I = call double @llvm.sqrt.f64( double %H )            ; <double> [#uses=1]
12        ret double %I
13}
14
15
16; SIN
17declare float @sinf(float) readonly
18
19declare double @sin(double) readonly
20
21define double @test_sin(float %F) {
22        %G = call float @sinf( float %F )               ; <float> [#uses=1]
23        %H = fpext float %G to double           ; <double> [#uses=1]
24        %I = call double @sin( double %H )              ; <double> [#uses=1]
25        ret double %I
26}
27
28
29; COS
30declare float @cosf(float) readonly
31
32declare double @cos(double) readonly
33
34define double @test_cos(float %F) {
35        %G = call float @cosf( float %F )               ; <float> [#uses=1]
36        %H = fpext float %G to double           ; <double> [#uses=1]
37        %I = call double @cos( double %H )              ; <double> [#uses=1]
38        ret double %I
39}
40
41