1 ; RUN: llc < %s -march=x86-64 -mcpu=core2 -mattr=+sse2 | FileCheck %s
4 define double @test1(double %A) {
5 %1 = bitcast double %A to <2 x i32>
6 %add = add <2 x i32> %1, <i32 3, i32 5>
7 %2 = bitcast <2 x i32> %add to double
10 ; FIXME: Ideally we should be able to fold the entire body of @test1 into a
11 ; single paddd instruction. At the moment we produce the sequence
12 ; pshufd+paddq+pshufd.
22 define double @test2(double %A, double %B) {
23 %1 = bitcast double %A to <2 x i32>
24 %2 = bitcast double %B to <2 x i32>
25 %add = add <2 x i32> %1, %2
26 %3 = bitcast <2 x i32> %add to double
29 ; FIXME: Ideally we should be able to fold the entire body of @test2 into a
30 ; single 'paddd %xmm1, %xmm0' instruction. At the moment we produce the
31 ; sequence pshufd+pshufd+paddq+pshufd.
42 define i64 @test3(i64 %A) {
43 %1 = bitcast i64 %A to <2 x float>
44 %add = fadd <2 x float> %1, <float 3.0, float 5.0>
45 %2 = bitcast <2 x float> %add to i64
55 define i64 @test4(i64 %A) {
56 %1 = bitcast i64 %A to <2 x i32>
57 %add = add <2 x i32> %1, <i32 3, i32 5>
58 %2 = bitcast <2 x i32> %add to i64
61 ; FIXME: At the moment we still produce the sequence pshufd+paddq+pshufd.
62 ; Ideally, we should fold that sequence into a single paddd.
71 define double @test5(double %A) {
72 %1 = bitcast double %A to <2 x float>
73 %add = fadd <2 x float> %1, <float 3.0, float 5.0>
74 %2 = bitcast <2 x float> %add to double