Have the X86 back-end emit the alias instead of what's being aliased. In most
[oota-llvm.git] / test / CodeGen / X86 / 2009-06-05-VZextByteShort.ll
1 ; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 | FileCheck %s
2
3 define <4 x i16> @a(i32* %x1) nounwind {
4 ; CHECK:      movzx
5 ; CHECK-NEXT: movd
6   %x2 = load i32* %x1
7   %x3 = lshr i32 %x2, 1
8   %x = trunc i32 %x3 to i16
9   %r = insertelement <4 x i16> zeroinitializer, i16 %x, i32 0
10   ret <4 x i16> %r
11 }
12
13 define <8 x i16> @b(i32* %x1) nounwind {
14 ; CHECK:      movzx
15 ; CHECK-NEXT: movd
16   %x2 = load i32* %x1
17   %x3 = lshr i32 %x2, 1
18   %x = trunc i32 %x3 to i16
19   %r = insertelement <8 x i16> zeroinitializer, i16 %x, i32 0
20   ret <8 x i16> %r
21 }
22
23 define <8 x i8> @c(i32* %x1) nounwind {
24 ; CHECK:      movzx
25 ; CHECK-NEXT: movd
26   %x2 = load i32* %x1
27   %x3 = lshr i32 %x2, 1
28   %x = trunc i32 %x3 to i8
29   %r = insertelement <8 x i8> zeroinitializer, i8 %x, i32 0
30   ret <8 x i8> %r
31 }
32
33 define <16 x i8> @d(i32* %x1) nounwind {
34 ; CHECK:      movzx
35 ; CHECK-NEXT: movd
36   %x2 = load i32* %x1
37   %x3 = lshr i32 %x2, 1
38   %x = trunc i32 %x3 to i8
39   %r = insertelement <16 x i8> zeroinitializer, i8 %x, i32 0
40   ret <16 x i8> %r
41 }
42