2009-09-09 01:54:48 +02:00
|
|
|
; RUN: llc < %s -march=x86 -mattr=+sse41 -o %t
|
2008-05-13 10:35:03 +02:00
|
|
|
; RUN: grep extractps %t | count 1
|
|
|
|
; RUN: grep pextrd %t | count 1
|
|
|
|
; RUN: not grep pshufd %t
|
|
|
|
; RUN: not grep movss %t
|
2008-03-24 22:52:23 +01:00
|
|
|
|
2008-05-13 10:35:03 +02:00
|
|
|
define void @t1(float* %R, <4 x float>* %P1) nounwind {
|
2008-03-24 22:52:23 +01:00
|
|
|
%X = load <4 x float>* %P1
|
|
|
|
%tmp = extractelement <4 x float> %X, i32 3
|
|
|
|
store float %tmp, float* %R
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2008-05-13 10:35:03 +02:00
|
|
|
define float @t2(<4 x float>* %P1) nounwind {
|
2008-03-24 22:52:23 +01:00
|
|
|
%X = load <4 x float>* %P1
|
|
|
|
%tmp = extractelement <4 x float> %X, i32 2
|
|
|
|
ret float %tmp
|
|
|
|
}
|
|
|
|
|
2008-05-13 10:35:03 +02:00
|
|
|
define void @t3(i32* %R, <4 x i32>* %P1) nounwind {
|
2008-03-24 22:52:23 +01:00
|
|
|
%X = load <4 x i32>* %P1
|
|
|
|
%tmp = extractelement <4 x i32> %X, i32 3
|
|
|
|
store i32 %tmp, i32* %R
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2008-05-13 10:35:03 +02:00
|
|
|
define i32 @t4(<4 x i32>* %P1) nounwind {
|
2008-03-24 22:52:23 +01:00
|
|
|
%X = load <4 x i32>* %P1
|
|
|
|
%tmp = extractelement <4 x i32> %X, i32 3
|
|
|
|
ret i32 %tmp
|
|
|
|
}
|