blob: fc0df060623fb57c61186f09bc7ee22b84566cb9 [file] [log] [blame]
Dan Gohman788db592008-04-16 02:32:24 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 | not grep extractps
2
3; The non-store form of extractps puts its result into a GPR.
4; This makes it suitable for an extract from a <4 x float> that
5; is bitcasted to i32, but unsuitable for much of anything else.
6
7define float @bar(<4 x float> %v) {
8 %s = extractelement <4 x float> %v, i32 3
9 %t = add float %s, 1.0
10 ret float %t
11}
12define float @baz(<4 x float> %v) {
13 %s = extractelement <4 x float> %v, i32 3
14 ret float %s
15}
16define i32 @qux(<4 x i32> %v) {
17 %i = extractelement <4 x i32> %v, i32 3
18 ret i32 %i
19}