Update comments to be actually accurate

llvm-svn: 26124
This commit is contained in:
Chris Lattner 2006-02-11 09:37:07 +00:00
parent 00601c0c7e
commit f3ed03481a
1 changed files with 20 additions and 14 deletions

View File

@ -1,17 +1,23 @@
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*pow'
; Testcase for calls to the standard C "pow" function
;
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
; RUN: llvm-as < %s | opt -simplify-libcalls -disable-output &&
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call double .pow'
declare double %pow(double, double)
%fpstorage = global double 5.0
implementation ; Functions:
int %main () {
%fpnum = load double* %fpstorage;
%one = call double %pow(double 1.0, double %fpnum)
%two = call double %pow(double %one, double 0.5)
%three = call double %pow(double %two, double 1.0)
%four = call double %pow(double %three, double -1.0)
%five = call double %pow(double %four, double 0.0)
%result = cast double %five to int
ret int %result
double %test1(double %X) {
%Y = call double %pow(double %X, double 0.0)
ret double %Y ; x^0.0 always equals 1.0
}
double %test2(double %X) {
%Y = call double %pow(double %X, double -0.0)
ret double %Y ; x^-0.0 always equals 1.0
}
double %test3(double %X) {
%Y = call double %pow(double 1.0, double %X)
ret double %Y ; 1.0^x always equals 1.0
}