blob: 4fe78ec29a179304655e131f3ccb3550d6b202d2 [file] [log] [blame]
Eli Friedmanb1410992011-03-23 22:18:48 +00001; RUN: llc < %s -march=x86 -mattr=+sse2,-avx
2
3define <1 x float> @test1(<1 x double> %x) nounwind {
4; CHECK: cvtsd2ss
5; CHECK: ret
6 %y = fptrunc <1 x double> %x to <1 x float>
7 ret <1 x float> %y
8}
9
10
11define <2 x float> @test2(<2 x double> %x) nounwind {
12; FIXME: It would be nice if this compiled down to a cvtpd2ps
13; CHECK: cvtsd2ss
14; CHECK: cvtsd2ss
15; CHECK: ret
16 %y = fptrunc <2 x double> %x to <2 x float>
17 ret <2 x float> %y
18}
19
20define <8 x float> @test3(<8 x double> %x) nounwind {
21; FIXME: It would be nice if this compiled down to a series of cvtpd2ps
22; CHECK: cvtsd2ss
23; CHECK: cvtsd2ss
24; CHECK: cvtsd2ss
25; CHECK: cvtsd2ss
26; CHECK: cvtsd2ss
27; CHECK: cvtsd2ss
28; CHECK: cvtsd2ss
29; CHECK: cvtsd2ss
30; CHECK: ret
31 %y = fptrunc <8 x double> %x to <8 x float>
32 ret <8 x float> %y
33}
34
35