summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/fp_to_int.ll
blob: 7b9c0e985bb43acd454b0811c66fec86919a47c6 (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
; 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
}