[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/fp_to_int.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Jul 29 18:33:49 PDT 2005



Changes in directory llvm/test/Regression/CodeGen/Generic:

fp_to_int.ll added (r1.1)
---
Log message:

this tests every fp-to-integer conversion


---
Diffs of the changes:  (+67 -0)

 fp_to_int.ll |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+)


Index: llvm/test/Regression/CodeGen/Generic/fp_to_int.ll
diff -c /dev/null llvm/test/Regression/CodeGen/Generic/fp_to_int.ll:1.1
*** /dev/null	Fri Jul 29 20:33:48 2005
--- llvm/test/Regression/CodeGen/Generic/fp_to_int.ll	Fri Jul 29 20:33:38 2005
***************
*** 0 ****
--- 1,67 ----
+ ; RUN: llvm-as < %s | llc
+ 
+ sbyte %test1(double %X) {
+ 	%tmp.1 = cast double %X to sbyte
+ 	ret sbyte %tmp.1
+ }
+ short %test2(double %X) {
+ 	%tmp.1 = cast double %X to short
+ 	ret short %tmp.1
+ }
+ int %test3(double %X) {
+ 	%tmp.1 = cast double %X to int
+ 	ret int %tmp.1
+ }
+ long %test4(double %X) {
+ 	%tmp.1 = cast double %X to long
+ 	ret long %tmp.1
+ }
+ ubyte %test1u(double %X) {
+ 	%tmp.1 = cast double %X to ubyte
+ 	ret ubyte %tmp.1
+ }
+ ushort %test2u(double %X) {
+ 	%tmp.1 = cast double %X to ushort
+ 	ret ushort %tmp.1
+ }
+ uint %test3u(double %X) {
+ 	%tmp.1 = cast double %X to uint
+ 	ret uint %tmp.1
+ }
+ ulong %test4u(double %X) {
+ 	%tmp.1 = cast double %X to ulong
+ 	ret ulong %tmp.1
+ }
+ 
+ sbyte %test1f(float %X) {
+ 	%tmp.1 = cast float %X to sbyte
+ 	ret sbyte %tmp.1
+ }
+ short %test2f(float %X) {
+ 	%tmp.1 = cast float %X to short
+ 	ret short %tmp.1
+ }
+ int %test3f(float %X) {
+ 	%tmp.1 = cast float %X to int
+ 	ret int %tmp.1
+ }
+ long %test4f(float %X) {
+ 	%tmp.1 = cast float %X to long
+ 	ret long %tmp.1
+ }
+ ubyte %test1uf(float %X) {
+ 	%tmp.1 = cast float %X to ubyte
+ 	ret ubyte %tmp.1
+ }
+ ushort %test2uf(float %X) {
+ 	%tmp.1 = cast float %X to ushort
+ 	ret ushort %tmp.1
+ }
+ uint %test3uf(float %X) {
+ 	%tmp.1 = cast float %X to uint
+ 	ret uint %tmp.1
+ }
+ ulong %test4uf(float %X) {
+ 	%tmp.1 = cast float %X to ulong
+ 	ret ulong %tmp.1
+ }






More information about the llvm-commits mailing list