1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.2 | FileCheck %s --check-prefix=X64
5 ; bitcast v12i8 to v3i32
7 define void @convert(ptr %dst.addr, <3 x i32> %src) nounwind {
10 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
11 ; X86-NEXT: pcmpeqd %xmm1, %xmm1
12 ; X86-NEXT: psubd %xmm1, %xmm0
13 ; X86-NEXT: pextrd $2, %xmm0, 8(%eax)
14 ; X86-NEXT: pextrd $1, %xmm0, 4(%eax)
15 ; X86-NEXT: movd %xmm0, (%eax)
20 ; X64-NEXT: pcmpeqd %xmm1, %xmm1
21 ; X64-NEXT: psubd %xmm1, %xmm0
22 ; X64-NEXT: pextrd $2, %xmm0, 8(%rdi)
23 ; X64-NEXT: movq %xmm0, (%rdi)
25 %add = add <3 x i32> %src, < i32 1, i32 1, i32 1 >
26 %conv = bitcast <3 x i32> %add to <12 x i8>
27 store <12 x i8> %conv, ptr %dst.addr