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(ptr %A) {
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
10 ; X86-NEXT: pmovzxbw {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
11 ; X86-NEXT: pmullw %xmm0, %xmm0
12 ; X86-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,2,4,6,u,u,u,u,u,u,u,u,u,u,u,u]
13 ; X86-NEXT: movd %xmm0, (%eax)
14 ; X86-NEXT: xorl %eax, %eax
18 ; X64: # %bb.0: # %entry
19 ; X64-NEXT: pmovzxbw {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
20 ; X64-NEXT: pmullw %xmm0, %xmm0
21 ; X64-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,2,4,6,u,u,u,u,u,u,u,u,u,u,u,u]
22 ; X64-NEXT: movd %xmm0, (%rax)
23 ; X64-NEXT: xorl %eax, %eax
26 %0 = load <4 x i8>, ptr %A, align 8
27 %mul = mul <4 x i8> %0, %0
28 store <4 x i8> %mul, ptr undef
32 define i32 @shuff_f(ptr %A) {
34 ; X86: # %bb.0: # %entry
35 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
36 ; X86-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
37 ; X86-NEXT: paddb %xmm0, %xmm0
38 ; X86-NEXT: movd %xmm0, (%eax)
39 ; X86-NEXT: xorl %eax, %eax
43 ; X64: # %bb.0: # %entry
44 ; X64-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
45 ; X64-NEXT: paddb %xmm0, %xmm0
46 ; X64-NEXT: movd %xmm0, (%rax)
47 ; X64-NEXT: xorl %eax, %eax
50 %0 = load <4 x i8>, ptr %A, align 8
51 %add = add <4 x i8> %0, %0
52 store <4 x i8> %add, ptr undef
56 define <2 x float> @bitcast_widen(<4 x i32> %in) nounwind readnone {
57 ; CHECK-LABEL: bitcast_widen:
58 ; CHECK: # %bb.0: # %entry
59 ; CHECK-NEXT: ret{{[l|q]}}
61 %x = shufflevector <4 x i32> %in, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
62 %y = bitcast <2 x i32> %x to <2 x float>