2006-12-02 04:23:10 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
|
2004-04-13 19:28:09 +00:00
|
|
|
|
2007-04-14 23:17:58 +00:00
|
|
|
declare double %cos(double)
|
|
|
|
declare double %sin(double)
|
|
|
|
declare double %tan(double)
|
|
|
|
declare double %sqrt(double)
|
2007-04-14 23:04:54 +00:00
|
|
|
declare bool %llvm.isunordered.f64(double, double)
|
2004-04-13 19:28:09 +00:00
|
|
|
|
|
|
|
double %T() {
|
2007-04-14 23:17:58 +00:00
|
|
|
%A = call double %cos(double 0.0)
|
|
|
|
%B = call double %sin(double 0.0)
|
2004-04-13 19:28:09 +00:00
|
|
|
%a = add double %A, %B
|
2007-04-14 23:17:58 +00:00
|
|
|
%C = call double %tan(double 0.0)
|
2004-04-13 19:28:09 +00:00
|
|
|
%b = add double %a, %C
|
2007-04-14 23:17:58 +00:00
|
|
|
%D = call double %sqrt(double 4.0)
|
2004-04-13 19:28:09 +00:00
|
|
|
%c = add double %b, %D
|
|
|
|
ret double %c
|
|
|
|
}
|
2004-06-11 06:16:13 +00:00
|
|
|
|
|
|
|
bool %TNAN() {
|
2007-04-14 23:04:54 +00:00
|
|
|
%A = call bool %llvm.isunordered.f64(double 0x7FF8000000000000, double 1.0) ;; it's a nan!
|
|
|
|
%B = call bool %llvm.isunordered.f64(double 123.0, double 1.0)
|
2004-06-11 06:16:13 +00:00
|
|
|
%C = or bool %A, %B
|
|
|
|
ret bool %C
|
|
|
|
}
|