mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
4591f06f44
Convert to new test system. This exposes IsDigit.ll as failing. llvm-svn: 36046
25 lines
648 B
LLVM
25 lines
648 B
LLVM
; Testcase for calls to the standard C "pow" function
|
|
;
|
|
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
|
|
; RUN: not grep {call double .pow}
|
|
; END.
|
|
|
|
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 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
|
|
}
|
|
|