aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic/fp_to_int.ll
blob: ad944132d338cf08298a5bf0e28710e51837306b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
; RUN: llc < %s

define i8 @test1(double %X) {
	%tmp.1 = fptosi double %X to i8		; <i8> [#uses=1]
	ret i8 %tmp.1
}

define i16 @test2(double %X) {
	%tmp.1 = fptosi double %X to i16		; <i16> [#uses=1]
	ret i16 %tmp.1
}

define i32 @test3(double %X) {
	%tmp.1 = fptosi double %X to i32		; <i32> [#uses=1]
	ret i32 %tmp.1
}

define i64 @test4(double %X) {
	%tmp.1 = fptosi double %X to i64		; <i64> [#uses=1]
	ret i64 %tmp.1
}

define i8 @test1u(double %X) {
	%tmp.1 = fptoui double %X to i8		; <i8> [#uses=1]
	ret i8 %tmp.1
}

define i16 @test2u(double %X) {
	%tmp.1 = fptoui double %X to i16		; <i16> [#uses=1]
	ret i16 %tmp.1
}

define i32 @test3u(double %X) {
	%tmp.1 = fptoui double %X to i32		; <i32> [#uses=1]
	ret i32 %tmp.1
}

define i64 @test4u(double %X) {
	%tmp.1 = fptoui double %X to i64		; <i64> [#uses=1]
	ret i64 %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
}