[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 22 22:24:28 PST 2006



Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls:

floor.ll updated: 1.2 -> 1.3
---
Log message:

add new tests


---
Diffs of the changes:  (+21 -2)

 floor.ll |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)


Index: llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll
diff -u llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll:1.2 llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll:1.3
--- llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll:1.2	Sun Jan 22 23:56:34 2006
+++ llvm/test/Regression/Transforms/SimplifyLibCalls/floor.ll	Mon Jan 23 00:24:17 2006
@@ -1,14 +1,33 @@
 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*floor(' &&
 ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*floorf('
-
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*ceil(' &&
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*ceilf('
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*nearbyint(' &&
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep 'call.*nearbyintf('
 ; XFAIL: sparc
 
 declare double %floor(double)
+declare double %ceil(double)
+declare double %nearbyint(double)
 
-float %test(float %C) {
+float %test_floor(float %C) {
 	%D = cast float %C to double
 	%E = call double %floor(double %D)  ; --> floorf
 	%F = cast double %E to float
 	ret float %F
 }
 
+float %test_ceil(float %C) {
+	%D = cast float %C to double
+	%E = call double %ceil(double %D)  ; --> ceilf
+	%F = cast double %E to float
+	ret float %F
+}
+
+float %test_nearbyint(float %C) {
+	%D = cast float %C to double
+	%E = call double %nearbyint(double %D)  ; --> floorf
+	%F = cast double %E to float
+	ret float %F
+}
+






More information about the llvm-commits mailing list