Remove virtual keyword for two routines that should never be overridden.
[oota-llvm.git] / test / Transforms / SimplifyLibCalls / pow2.ll
1 ; Testcase for calls to the standard C "pow" function
2 ;
3 ; RUN: opt < %s -simplify-libcalls -S | not grep "call .pow"
4
5
6 declare double @pow(double, double)
7 declare float @powf(float, float)
8
9 define double @test1(double %X) {
10         %Y = call double @pow( double %X, double 0.000000e+00 )         ; <double> [#uses=1]
11         ret double %Y
12 }
13
14 define double @test2(double %X) {
15         %Y = call double @pow( double %X, double -0.000000e+00 )                ; <double> [#uses=1]
16         ret double %Y
17 }
18
19 define double @test3(double %X) {
20         %Y = call double @pow( double 1.000000e+00, double %X )         ; <double> [#uses=1]
21         ret double %Y
22 }
23
24 define double @test4(double %X) {
25         %Y = call double @pow( double %X, double 2.0)
26         ret double %Y
27 }
28
29 define float @test4f(float %X) {
30         %Y = call float @powf( float %X, float 2.0)
31         ret float %Y
32 }
33
34 define float @test5f(float %X) {
35         %Y = call float @powf(float 2.0, float %X)  ;; exp2
36         ret float %Y
37 }