[PowerPC] Recommit r314244 with refactoring and off by default
[llvm-core.git] / test / CodeGen / X86 / 2011-12-8-bitcastintprom.ll
blobe2ccaa1b837862b851b23603312fec729416a83a
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse2 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE2
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+sse4.1 | FileCheck %s --check-prefix=CHECK --check-prefix=SSE41
5 ; Make sure that the conversion between v4i8 to v2i16 is not a simple bitcast.
6 define void @prom_bug(<4 x i8> %t, i16* %p) {
7 ; SSE2-LABEL: prom_bug:
8 ; SSE2:       ## BB#0:
9 ; SSE2-NEXT:    pand {{.*}}(%rip), %xmm0
10 ; SSE2-NEXT:    packuswb %xmm0, %xmm0
11 ; SSE2-NEXT:    packuswb %xmm0, %xmm0
12 ; SSE2-NEXT:    pshufd {{.*#+}} xmm0 = xmm0[0,1,0,3]
13 ; SSE2-NEXT:    pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,5,5,6,7]
14 ; SSE2-NEXT:    movd %xmm0, %eax
15 ; SSE2-NEXT:    movw %ax, (%rdi)
16 ; SSE2-NEXT:    retq
18 ; SSE41-LABEL: prom_bug:
19 ; SSE41:       ## BB#0:
20 ; SSE41-NEXT:    pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
21 ; SSE41-NEXT:    pextrw $0, %xmm0, (%rdi)
22 ; SSE41-NEXT:    retq
23   %r = bitcast <4 x i8> %t to <2 x i16>
24   %o = extractelement <2 x i16> %r, i32 0
25   store i16 %o, i16* %p
26   ret void