1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ;RUN: llc < %s -mtriple=i686-unknown -mattr=sse2 -relocation-model=pic | FileCheck %s
4 define void @f(ptr %out, <16 x i8> %in, i1 %flag) {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: calll .L0$pb
8 ; CHECK-NEXT: .cfi_adjust_cfa_offset 4
10 ; CHECK-NEXT: popl %eax
11 ; CHECK-NEXT: .cfi_adjust_cfa_offset -4
13 ; CHECK-NEXT: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
14 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
15 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %edx
16 ; CHECK-NEXT: notb %dl
17 ; CHECK-NEXT: andb $1, %dl
18 ; CHECK-NEXT: movzbl %dl, %edx
19 ; CHECK-NEXT: movd %edx, %xmm1
20 ; CHECK-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
21 ; CHECK-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[0,0,0,0,4,5,6,7]
22 ; CHECK-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,0,0,0]
23 ; CHECK-NEXT: paddb %xmm1, %xmm1
24 ; CHECK-NEXT: pxor %xmm0, %xmm1
25 ; CHECK-NEXT: pxor {{\.?LCPI[0-9]+_[0-9]+}}@GOTOFF(%eax), %xmm1
26 ; CHECK-NEXT: movdqa %xmm1, (%ecx)
29 %0 = select i1 %flag, i8 0, i8 2
30 %1 = insertelement <16 x i8> undef, i8 %0, i32 0
31 %2 = shufflevector <16 x i8> %1, <16 x i8> undef, <16 x i32> zeroinitializer
32 %3 = xor <16 x i8> %2, %in
33 %4 = xor <16 x i8> %3, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
34 store <16 x i8> %4, ptr %out, align 16