upgrade this test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-11-28 18:22:12 +00:00
parent 0a0cfdf825
commit 4b341b4178

View File

@ -1,67 +1,81 @@
; RUN: llvm-upgrade < %s | llvm-as | llc
; 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
define i8 @test1(double %X) {
%tmp.1 = fptosi double %X to i8 ; <i8> [#uses=1]
ret i8 %tmp.1
}
sbyte %test1f(float %X) {
%tmp.1 = cast float %X to sbyte
ret sbyte %tmp.1
define i16 @test2(double %X) {
%tmp.1 = fptosi double %X to i16 ; <i16> [#uses=1]
ret i16 %tmp.1
}
short %test2f(float %X) {
%tmp.1 = cast float %X to short
ret short %tmp.1
define i32 @test3(double %X) {
%tmp.1 = fptosi double %X to i32 ; <i32> [#uses=1]
ret i32 %tmp.1
}
int %test3f(float %X) {
%tmp.1 = cast float %X to int
ret int %tmp.1
define i64 @test4(double %X) {
%tmp.1 = fptosi double %X to i64 ; <i64> [#uses=1]
ret i64 %tmp.1
}
long %test4f(float %X) {
%tmp.1 = cast float %X to long
ret long %tmp.1
define i8 @test1u(double %X) {
%tmp.1 = fptoui double %X to i8 ; <i8> [#uses=1]
ret i8 %tmp.1
}
ubyte %test1uf(float %X) {
%tmp.1 = cast float %X to ubyte
ret ubyte %tmp.1
define i16 @test2u(double %X) {
%tmp.1 = fptoui double %X to i16 ; <i16> [#uses=1]
ret i16 %tmp.1
}
ushort %test2uf(float %X) {
%tmp.1 = cast float %X to ushort
ret ushort %tmp.1
define i32 @test3u(double %X) {
%tmp.1 = fptoui double %X to i32 ; <i32> [#uses=1]
ret i32 %tmp.1
}
uint %test3uf(float %X) {
%tmp.1 = cast float %X to uint
ret uint %tmp.1
define i64 @test4u(double %X) {
%tmp.1 = fptoui double %X to i64 ; <i64> [#uses=1]
ret i64 %tmp.1
}
ulong %test4uf(float %X) {
%tmp.1 = cast float %X to ulong
ret ulong %tmp.1
define i8 @test1f(float %X) {
%tmp.1 = fptosi float %X to i8 ; <i8> [#uses=1]
ret i8 %tmp.1
}
define i16 @test2f(float %X) {
%tmp.1 = fptosi float %X to i16 ; <i16> [#uses=1]
ret i16 %tmp.1
}
define i32 @test3f(float %X) {
%tmp.1 = fptosi float %X to i32 ; <i32> [#uses=1]
ret i32 %tmp.1
}
define i64 @test4f(float %X) {
%tmp.1 = fptosi float %X to i64 ; <i64> [#uses=1]
ret i64 %tmp.1
}
define i8 @test1uf(float %X) {
%tmp.1 = fptoui float %X to i8 ; <i8> [#uses=1]
ret i8 %tmp.1
}
define i16 @test2uf(float %X) {
%tmp.1 = fptoui float %X to i16 ; <i16> [#uses=1]
ret i16 %tmp.1
}
define i32 @test3uf(float %X) {
%tmp.1 = fptoui float %X to i32 ; <i32> [#uses=1]
ret i32 %tmp.1
}
define i64 @test4uf(float %X) {
%tmp.1 = fptoui float %X to i64 ; <i64> [#uses=1]
ret i64 %tmp.1
}