1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mcpu=corei7 -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
4 define void @foo(<4 x float> %in, <4 x i8>* %out) {
7 ; CHECK-NEXT: cvttps2dq %xmm0, %xmm0
8 ; CHECK-NEXT: pextrb $8, %xmm0, %eax
9 ; CHECK-NEXT: pextrb $4, %xmm0, %ecx
10 ; CHECK-NEXT: pextrb $0, %xmm0, %edx
11 ; CHECK-NEXT: movd %edx, %xmm0
12 ; CHECK-NEXT: pinsrb $1, %ecx, %xmm0
13 ; CHECK-NEXT: pinsrb $2, %eax, %xmm0
14 ; CHECK-NEXT: movl $255, %eax
15 ; CHECK-NEXT: pinsrb $3, %eax, %xmm0
16 ; CHECK-NEXT: movd %xmm0, (%rdi)
18 %t0 = fptosi <4 x float> %in to <4 x i32>
19 %t1 = trunc <4 x i32> %t0 to <4 x i16>
20 %t2 = shufflevector <4 x i16> %t1, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
21 %t3 = trunc <8 x i16> %t2 to <8 x i8>
22 %t4 = shufflevector <8 x i8> %t3, <8 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
23 %t5 = insertelement <4 x i8> %t4, i8 -1, i32 3
24 store <4 x i8> %t5, <4 x i8>* %out