blob: 5c514805e485c009b23963860854e26019a7aeda [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 > %t1
Eli Friedmand49401f2009-06-06 06:05:10 +00002; RUN: grep movzwl %t1 | count 2
3; RUN: grep movzbl %t1 | count 2
4; RUN: grep movd %t1 | count 4
5
6define <4 x i16> @a(i32* %x1) nounwind {
7 %x2 = load i32* %x1
8 %x3 = lshr i32 %x2, 1
9 %x = trunc i32 %x3 to i16
10 %r = insertelement <4 x i16> zeroinitializer, i16 %x, i32 0
11 ret <4 x i16> %r
12}
13
14define <8 x i16> @b(i32* %x1) nounwind {
15 %x2 = load i32* %x1
16 %x3 = lshr i32 %x2, 1
17 %x = trunc i32 %x3 to i16
18 %r = insertelement <8 x i16> zeroinitializer, i16 %x, i32 0
19 ret <8 x i16> %r
20}
21
22define <8 x i8> @c(i32* %x1) nounwind {
23 %x2 = load i32* %x1
24 %x3 = lshr i32 %x2, 1
25 %x = trunc i32 %x3 to i8
26 %r = insertelement <8 x i8> zeroinitializer, i8 %x, i32 0
27 ret <8 x i8> %r
28}
29
30define <16 x i8> @d(i32* %x1) nounwind {
31 %x2 = load i32* %x1
32 %x3 = lshr i32 %x2, 1
33 %x = trunc i32 %x3 to i8
34 %r = insertelement <16 x i8> zeroinitializer, i8 %x, i32 0
35 ret <16 x i8> %r
36}
37