llvm.org GIT mirror llvm / 4b341b4
upgrade this test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44405 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 70 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | llc
0 ; RUN: llvm-as < %s | llc
11
2 sbyte %test1(double %X) {
3 %tmp.1 = cast double %X to sbyte
4 ret sbyte %tmp.1
5 }
6 short %test2(double %X) {
7 %tmp.1 = cast double %X to short
8 ret short %tmp.1
9 }
10 int %test3(double %X) {
11 %tmp.1 = cast double %X to int
12 ret int %tmp.1
13 }
14 long %test4(double %X) {
15 %tmp.1 = cast double %X to long
16 ret long %tmp.1
17 }
18 ubyte %test1u(double %X) {
19 %tmp.1 = cast double %X to ubyte
20 ret ubyte %tmp.1
21 }
22 ushort %test2u(double %X) {
23 %tmp.1 = cast double %X to ushort
24 ret ushort %tmp.1
25 }
26 uint %test3u(double %X) {
27 %tmp.1 = cast double %X to uint
28 ret uint %tmp.1
29 }
30 ulong %test4u(double %X) {
31 %tmp.1 = cast double %X to ulong
32 ret ulong %tmp.1
2 define i8 @test1(double %X) {
3 %tmp.1 = fptosi double %X to i8 ; [#uses=1]
4 ret i8 %tmp.1
335 }
346
35 sbyte %test1f(float %X) {
36 %tmp.1 = cast float %X to sbyte
37 ret sbyte %tmp.1
7 define i16 @test2(double %X) {
8 %tmp.1 = fptosi double %X to i16 ; [#uses=1]
9 ret i16 %tmp.1
3810 }
39 short %test2f(float %X) {
40 %tmp.1 = cast float %X to short
41 ret short %tmp.1
11
12 define i32 @test3(double %X) {
13 %tmp.1 = fptosi double %X to i32 ; [#uses=1]
14 ret i32 %tmp.1
4215 }
43 int %test3f(float %X) {
44 %tmp.1 = cast float %X to int
45 ret int %tmp.1
16
17 define i64 @test4(double %X) {
18 %tmp.1 = fptosi double %X to i64 ; [#uses=1]
19 ret i64 %tmp.1
4620 }
47 long %test4f(float %X) {
48 %tmp.1 = cast float %X to long
49 ret long %tmp.1
21
22 define i8 @test1u(double %X) {
23 %tmp.1 = fptoui double %X to i8 ; [#uses=1]
24 ret i8 %tmp.1
5025 }
51 ubyte %test1uf(float %X) {
52 %tmp.1 = cast float %X to ubyte
53 ret ubyte %tmp.1
26
27 define i16 @test2u(double %X) {
28 %tmp.1 = fptoui double %X to i16 ; [#uses=1]
29 ret i16 %tmp.1
5430 }
55 ushort %test2uf(float %X) {
56 %tmp.1 = cast float %X to ushort
57 ret ushort %tmp.1
31
32 define i32 @test3u(double %X) {
33 %tmp.1 = fptoui double %X to i32 ; [#uses=1]
34 ret i32 %tmp.1
5835 }
59 uint %test3uf(float %X) {
60 %tmp.1 = cast float %X to uint
61 ret uint %tmp.1
36
37 define i64 @test4u(double %X) {
38 %tmp.1 = fptoui double %X to i64 ; [#uses=1]
39 ret i64 %tmp.1
6240 }
63 ulong %test4uf(float %X) {
64 %tmp.1 = cast float %X to ulong
65 ret ulong %tmp.1
41
42 define i8 @test1f(float %X) {
43 %tmp.1 = fptosi float %X to i8 ; [#uses=1]
44 ret i8 %tmp.1
6645 }
46
47 define i16 @test2f(float %X) {
48 %tmp.1 = fptosi float %X to i16 ; [#uses=1]
49 ret i16 %tmp.1
50 }
51
52 define i32 @test3f(float %X) {
53 %tmp.1 = fptosi float %X to i32 ; [#uses=1]
54 ret i32 %tmp.1
55 }
56
57 define i64 @test4f(float %X) {
58 %tmp.1 = fptosi float %X to i64 ; [#uses=1]
59 ret i64 %tmp.1
60 }
61
62 define i8 @test1uf(float %X) {
63 %tmp.1 = fptoui float %X to i8 ; [#uses=1]
64 ret i8 %tmp.1
65 }
66
67 define i16 @test2uf(float %X) {
68 %tmp.1 = fptoui float %X to i16 ; [#uses=1]
69 ret i16 %tmp.1
70 }
71
72 define i32 @test3uf(float %X) {
73 %tmp.1 = fptoui float %X to i32 ; [#uses=1]
74 ret i32 %tmp.1
75 }
76
77 define i64 @test4uf(float %X) {
78 %tmp.1 = fptoui float %X to i64 ; [#uses=1]
79 ret i64 %tmp.1
80 }