1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 23:42:52 +01:00
llvm-mirror/test/CodeGen/Generic/intrinsics.ll

41 lines
1.1 KiB
LLVM
Raw Normal View History

; RUN: llc < %s
2005-04-30 06:41:27 +02:00
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
2005-04-30 06:41:27 +02:00
2005-04-30 06:41:27 +02:00
; SIN
declare float @sinf(float) readonly
declare double @sin(double) readonly
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
2005-04-30 06:41:27 +02:00
}
2005-04-30 06:41:27 +02:00
; COS
declare float @cosf(float) readonly
declare double @cos(double) readonly
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
2005-04-30 06:41:27 +02:00
}