2002-12-25 05:14:29 +00:00
|
|
|
|
2002-12-28 20:00:47 +00:00
|
|
|
double %test(double* %DP, double %Arg) {
|
2002-12-25 05:14:29 +00:00
|
|
|
%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
|
2003-11-26 14:45:37 +00:00
|
|
|
%Z1 = div double %Z, %W
|
2002-12-28 20:00:47 +00:00
|
|
|
%Q = add double %Z, %Arg
|
2003-01-13 00:56:54 +00:00
|
|
|
%R = cast double %Q to double
|
|
|
|
store double %R, double* %DP
|
2002-12-25 05:14:29 +00:00
|
|
|
ret double %Z
|
|
|
|
}
|
|
|
|
|
|
|
|
int %main() {
|
|
|
|
%X = alloca double
|
2003-01-13 00:56:54 +00:00
|
|
|
call double %test(double* %X, double 2.0)
|
2002-12-25 05:14:29 +00:00
|
|
|
ret int 0
|
|
|
|
}
|