1 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis > %t
2 ; RUN: not grep {call.*floor(} %t
3 ; RUN: grep {call.*floorf(} %t
4 ; RUN: not grep {call.*ceil(} %t
5 ; RUN: grep {call.*ceilf(} %t
6 ; RUN: not grep {call.*nearbyint(} %t
7 ; RUN: grep {call.*nearbyintf(} %t
10 declare double %floor(double)
11 declare double %ceil(double)
12 declare double %nearbyint(double)
14 float %test_floor(float %C) {
15 %D = cast float %C to double
16 %E = call double %floor(double %D) ; --> floorf
17 %F = cast double %E to float
21 float %test_ceil(float %C) {
22 %D = cast float %C to double
23 %E = call double %ceil(double %D) ; --> ceilf
24 %F = cast double %E to float
28 float %test_nearbyint(float %C) {
29 %D = cast float %C to double
30 %E = call double %nearbyint(double %D) ; --> floorf
31 %F = cast double %E to float