blob: 93ab68ee169df3942cac003e3f0239fc85195c11 [file] [log] [blame]
Chris Lattnerf172ecd2010-07-04 23:07:25 +00001; RUN: llc < %s -march=x86-64 -asm-verbose=0 -o - | FileCheck %s -check-prefix=X64
Chris Lattner4fd1ab32010-07-05 03:56:55 +00002; RUN: llc < %s -mcpu=yonah -march=x86 -asm-verbose=0 -o - | FileCheck %s -check-prefix=X32
Chris Lattnere35d9842010-07-04 22:57:10 +00003
4; PR7518
5define void @test1(<2 x float> %Q, float *%P2) nounwind {
6 %a = extractelement <2 x float> %Q, i32 0
7 %b = extractelement <2 x float> %Q, i32 1
8 %c = fadd float %a, %b
9
10 store float %c, float* %P2
11 ret void
Chris Lattnerf172ecd2010-07-04 23:07:25 +000012; X64: test1:
13; X64-NEXT: addss %xmm1, %xmm0
14; X64-NEXT: movss %xmm0, (%rdi)
15; X64-NEXT: ret
16
17; X32: test1:
18; X32-NEXT: movss 4(%esp), %xmm0
19; X32-NEXT: addss 8(%esp), %xmm0
20; X32-NEXT: movl 12(%esp), %eax
21; X32-NEXT: movss %xmm0, (%eax)
22; X32-NEXT: ret
Chris Lattnere35d9842010-07-04 22:57:10 +000023}
24