aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/test-fp.ll
blob: 6d32ecbffceb1647ecc6ae38dcd6e6e25222ed16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

double %test(double* %DP, double %Arg) {
	%D = load double* %DP
	%V = add double %D, 1.0
	%W = sub double %V, %V
	%X = mul double %W, %W
	%Y = div double %X, %X
	%Z = rem double %Y, %Y
	%Z = div double %Z, %W
	%Q = add double %Z, %Arg
	%R = cast double %Q to double
	store double %R, double* %DP
	ret double %Z
}

int %main() { 
  %X = alloca double
  call double %test(double* %X, double 2.0)
  ret int 0 
}