2003-03-05 22:56:59 +00:00
|
|
|
; Testcase for calls to the standard C "pow" function
|
2003-03-05 23:02:25 +00:00
|
|
|
;
|
|
|
|
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
|
2004-11-06 20:38:27 +00:00
|
|
|
; XFAIL: *
|
2004-11-22 19:25:45 +00:00
|
|
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call double .pow'
|
2003-03-05 22:56:59 +00:00
|
|
|
|
|
|
|
declare double %pow(double, double)
|
|
|
|
|
|
|
|
double %test1(double %X) {
|
|
|
|
%Y = call double %pow(double %X, double 0.0)
|
|
|
|
ret double %Y ; x^0.0 always equals 0.0
|
|
|
|
}
|
|
|
|
|
|
|
|
double %test2(double %X) {
|
|
|
|
%Y = call double %pow(double %X, double -0.0)
|
|
|
|
ret double %Y ; x^-0.0 always equals 0.0
|
|
|
|
}
|
|
|
|
|
|
|
|
double %test3(double %X) {
|
|
|
|
%Y = call double %pow(double 1.0, double %X)
|
|
|
|
ret double %Y ; 1.0^x always equals 1.0
|
|
|
|
}
|
|
|
|
|