1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=i386-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32 3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64 4 5 ; Used movq to load i64 into a v2i64 when the top i64 is 0. 6 7 define <2 x i64> @foo1(i64* %y) nounwind { 8 ; X32-LABEL: foo1: 9 ; X32: # BB#0: # %entry 10 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 11 ; X32-NEXT: movq {{.*#+}} xmm0 = mem[0],zero 12 ; X32-NEXT: retl 13 ; 14 ; X64-LABEL: foo1: 15 ; X64: # BB#0: # %entry 16 ; X64-NEXT: movq {{.*#+}} xmm0 = mem[0],zero 17 ; X64-NEXT: retq 18 entry: 19 %tmp1 = load i64, i64* %y, align 8 20 %s2v = insertelement <2 x i64> undef, i64 %tmp1, i32 0 21 %loadl = shufflevector <2 x i64> zeroinitializer, <2 x i64> %s2v, <2 x i32> <i32 2, i32 1> 22 ret <2 x i64> %loadl 23 } 24 25 26 define <4 x float> @foo2(i64* %p) nounwind { 27 ; X32-LABEL: foo2: 28 ; X32: # BB#0: # %entry 29 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 30 ; X32-NEXT: movq {{.*#+}} xmm0 = mem[0],zero 31 ; X32-NEXT: retl 32 ; 33 ; X64-LABEL: foo2: 34 ; X64: # BB#0: # %entry 35 ; X64-NEXT: movq {{.*#+}} xmm0 = mem[0],zero 36 ; X64-NEXT: retq 37 entry: 38 %load = load i64, i64* %p 39 %s2v = insertelement <2 x i64> undef, i64 %load, i32 0 40 %loadl = shufflevector <2 x i64> zeroinitializer, <2 x i64> %s2v, <2 x i32> <i32 2, i32 1> 41 %0 = bitcast <2 x i64> %loadl to <4 x float> 42 ret <4 x float> %0 43 } 44