1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mcpu=corei7 | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s --check-prefixes=CHECK,X64
5 define i32 @mul_f(<4 x i8>* %A) {
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
10 ; X86-NEXT: pmaddwd %xmm0, %xmm0
11 ; X86-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
12 ; X86-NEXT: movd %xmm0, (%eax)
13 ; X86-NEXT: xorl %eax, %eax
17 ; X64: # %bb.0: # %entry
18 ; X64-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
19 ; X64-NEXT: pmaddwd %xmm0, %xmm0
20 ; X64-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
21 ; X64-NEXT: movd %xmm0, (%rax)
22 ; X64-NEXT: xorl %eax, %eax
25 %0 = load <4 x i8>, <4 x i8>* %A, align 8
26 %mul = mul <4 x i8> %0, %0
27 store <4 x i8> %mul, <4 x i8>* undef
31 define i32 @shuff_f(<4 x i8>* %A) {
33 ; X86: # %bb.0: # %entry
34 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
35 ; X86-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
36 ; X86-NEXT: paddd %xmm0, %xmm0
37 ; X86-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
38 ; X86-NEXT: movd %xmm0, (%eax)
39 ; X86-NEXT: xorl %eax, %eax
43 ; X64: # %bb.0: # %entry
44 ; X64-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
45 ; X64-NEXT: paddd %xmm0, %xmm0
46 ; X64-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,4,8,12,u,u,u,u,u,u,u,u,u,u,u,u]
47 ; X64-NEXT: movd %xmm0, (%rax)
48 ; X64-NEXT: xorl %eax, %eax
51 %0 = load <4 x i8>, <4 x i8>* %A, align 8
52 %add = add <4 x i8> %0, %0
53 store <4 x i8> %add, <4 x i8>* undef
57 define <2 x float> @bitcast_widen(<4 x i32> %in) nounwind readnone {
58 ; CHECK-LABEL: bitcast_widen:
59 ; CHECK: # %bb.0: # %entry
60 ; CHECK-NEXT: ret{{[l|q]}}
62 %x = shufflevector <4 x i32> %in, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
63 %y = bitcast <2 x i32> %x to <2 x float>