67 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=nehalem | FileCheck %s3 4define <4 x float> @a(ptr %y) nounwind {5; CHECK-LABEL: a:6; CHECK: # %bb.0:7; CHECK-NEXT: movups (%rdi), %xmm08; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,2,1,0]9; CHECK-NEXT: retq10 %x = load <4 x float>, ptr %y, align 411 %a = extractelement <4 x float> %x, i32 012 %b = extractelement <4 x float> %x, i32 113 %c = extractelement <4 x float> %x, i32 214 %d = extractelement <4 x float> %x, i32 315 %p = insertelement <4 x float> undef, float %d, i32 016 %q = insertelement <4 x float> %p, float %c, i32 117 %r = insertelement <4 x float> %q, float %b, i32 218 %s = insertelement <4 x float> %r, float %a, i32 319 ret <4 x float> %s20}21 22define <4 x float> @b(ptr %y, <4 x float> %z) nounwind {23; CHECK-LABEL: b:24; CHECK: # %bb.0:25; CHECK-NEXT: movups (%rdi), %xmm126; CHECK-NEXT: unpckhps {{.*#+}} xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]27; CHECK-NEXT: retq28 %x = load <4 x float>, ptr %y, align 429 %a = extractelement <4 x float> %x, i32 230 %b = extractelement <4 x float> %x, i32 331 %c = extractelement <4 x float> %z, i32 232 %d = extractelement <4 x float> %z, i32 333 %p = insertelement <4 x float> undef, float %c, i32 034 %q = insertelement <4 x float> %p, float %a, i32 135 %r = insertelement <4 x float> %q, float %d, i32 236 %s = insertelement <4 x float> %r, float %b, i32 337 ret <4 x float> %s38}39 40define <2 x double> @c(ptr %y) nounwind {41; CHECK-LABEL: c:42; CHECK: # %bb.0:43; CHECK-NEXT: movups (%rdi), %xmm044; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,3,0,1]45; CHECK-NEXT: retq46 %x = load <2 x double>, ptr %y, align 847 %a = extractelement <2 x double> %x, i32 048 %c = extractelement <2 x double> %x, i32 149 %p = insertelement <2 x double> undef, double %c, i32 050 %r = insertelement <2 x double> %p, double %a, i32 151 ret <2 x double> %r52}53 54define <2 x double> @d(ptr %y, <2 x double> %z) nounwind {55; CHECK-LABEL: d:56; CHECK: # %bb.0:57; CHECK-NEXT: movups (%rdi), %xmm158; CHECK-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1],xmm1[1]59; CHECK-NEXT: retq60 %x = load <2 x double>, ptr %y, align 861 %a = extractelement <2 x double> %x, i32 162 %c = extractelement <2 x double> %z, i32 163 %p = insertelement <2 x double> undef, double %c, i32 064 %r = insertelement <2 x double> %p, double %a, i32 165 ret <2 x double> %r66}67