2009-08-15 17:28:09 +00:00
|
|
|
; Tests for SSE2 and below, without SSE3+.
|
2009-12-07 19:04:31 +00:00
|
|
|
; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=pentium4 -O3 | FileCheck %s
|
2008-05-24 00:10:02 +00:00
|
|
|
|
|
|
|
define void @t1(<2 x double>* %r, <2 x double>* %A, double %B) nounwind {
|
|
|
|
%tmp3 = load <2 x double>* %A, align 16
|
|
|
|
%tmp7 = insertelement <2 x double> undef, double %B, i32 0
|
|
|
|
%tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 2, i32 1 >
|
|
|
|
store <2 x double> %tmp9, <2 x double>* %r, align 16
|
|
|
|
ret void
|
2009-08-15 17:28:09 +00:00
|
|
|
|
|
|
|
; CHECK: t1:
|
|
|
|
; CHECK: movl 8(%esp), %eax
|
2009-10-23 05:58:34 +00:00
|
|
|
; CHECK-NEXT: movl 4(%esp), %ecx
|
2009-08-15 18:32:21 +00:00
|
|
|
; CHECK-NEXT: movapd (%eax), %xmm0
|
|
|
|
; CHECK-NEXT: movlpd 12(%esp), %xmm0
|
2009-10-23 05:58:34 +00:00
|
|
|
; CHECK-NEXT: movapd %xmm0, (%ecx)
|
2009-08-15 18:32:21 +00:00
|
|
|
; CHECK-NEXT: ret
|
2008-05-24 00:10:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define void @t2(<2 x double>* %r, <2 x double>* %A, double %B) nounwind {
|
|
|
|
%tmp3 = load <2 x double>* %A, align 16
|
|
|
|
%tmp7 = insertelement <2 x double> undef, double %B, i32 0
|
|
|
|
%tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 0, i32 2 >
|
|
|
|
store <2 x double> %tmp9, <2 x double>* %r, align 16
|
|
|
|
ret void
|
2009-08-15 17:28:09 +00:00
|
|
|
|
|
|
|
; CHECK: t2:
|
|
|
|
; CHECK: movl 8(%esp), %eax
|
2009-10-23 05:58:34 +00:00
|
|
|
; CHECK-NEXT: movl 4(%esp), %ecx
|
2009-08-15 18:32:21 +00:00
|
|
|
; CHECK-NEXT: movapd (%eax), %xmm0
|
|
|
|
; CHECK-NEXT: movhpd 12(%esp), %xmm0
|
2009-10-23 05:58:34 +00:00
|
|
|
; CHECK-NEXT: movapd %xmm0, (%ecx)
|
2009-08-15 18:32:21 +00:00
|
|
|
; CHECK-NEXT: ret
|
2008-05-24 00:10:02 +00:00
|
|
|
}
|