2009-09-08 22:34:10 +00:00
|
|
|
; RUN: opt < %s -constprop -S | not grep call
|
2008-03-01 09:15:35 +00:00
|
|
|
|
|
|
|
declare double @cos(double)
|
|
|
|
|
|
|
|
declare double @sin(double)
|
|
|
|
|
|
|
|
declare double @tan(double)
|
|
|
|
|
|
|
|
declare double @sqrt(double)
|
|
|
|
|
|
|
|
declare i1 @llvm.isunordered.f64(double, double)
|
|
|
|
|
|
|
|
define double @T() {
|
|
|
|
%A = call double @cos( double 0.000000e+00 ) ; <double> [#uses=1]
|
|
|
|
%B = call double @sin( double 0.000000e+00 ) ; <double> [#uses=1]
|
2009-06-04 22:49:04 +00:00
|
|
|
%a = fadd double %A, %B ; <double> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
%C = call double @tan( double 0.000000e+00 ) ; <double> [#uses=1]
|
2009-06-04 22:49:04 +00:00
|
|
|
%b = fadd double %a, %C ; <double> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
%D = call double @sqrt( double 4.000000e+00 ) ; <double> [#uses=1]
|
2009-06-04 22:49:04 +00:00
|
|
|
%c = fadd double %b, %D ; <double> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
ret double %c
|
2004-04-13 19:28:09 +00:00
|
|
|
}
|
2004-06-11 06:16:13 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define i1 @TNAN() {
|
|
|
|
%A = fcmp uno double 0x7FF8000000000000, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%B = fcmp uno double 1.230000e+02, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%C = or i1 %A, %B ; <i1> [#uses=1]
|
|
|
|
ret i1 %C
|
2004-06-11 06:16:13 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|