llvm-project/llvm/test/ExecutionEngine/test-fp.ll

25 lines
517 B
LLVM
Raw Normal View History

; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
2004-11-07 07:32:43 +08:00
; RUN: lli %t.bc > /dev/null
2002-12-25 13:14:29 +08:00
2002-12-29 04:00:47 +08:00
double %test(double* %DP, double %Arg) {
2002-12-25 13:14:29 +08: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
%Z1 = div double %Z, %W
2002-12-29 04:00:47 +08:00
%Q = add double %Z, %Arg
2003-01-13 08:56:54 +08:00
%R = cast double %Q to double
store double %R, double* %DP
2002-12-25 13:14:29 +08:00
ret double %Z
}
int %main() {
%X = alloca double
store double 0.0, double* %X
2003-01-13 08:56:54 +08:00
call double %test(double* %X, double 2.0)
2002-12-25 13:14:29 +08:00
ret int 0
}