fix PR7518 - terrible codegen of <2 x float>, by only marking
v2f32 as legal in 32-bit mode.  It is just as terrible there,
but I just care about x86-64 and noone claims it is valuable
in 64-bit mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107600 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/X86/v2f32.ll b/test/CodeGen/X86/v2f32.ll
new file mode 100644
index 0000000..509d528
--- /dev/null
+++ b/test/CodeGen/X86/v2f32.ll
@@ -0,0 +1,16 @@
+; RUN: llc < %s -march=x86-64 -asm-verbose=0 -o - | FileCheck %s
+
+; PR7518
+define void @test1(<2 x float> %Q, float *%P2) nounwind {
+  %a = extractelement <2 x float> %Q, i32 0
+  %b = extractelement <2 x float> %Q, i32 1
+  %c = fadd float %a, %b
+
+  store float %c, float* %P2
+  ret void
+; CHECK: test1:
+; CHECK-NEXT: addss	%xmm1, %xmm0
+; CHECK-NEXT: movss	%xmm0, (%rdi)
+; CHECK-NEXT: ret
+}
+