blob: 470d146715967a17ff6946b436d61737b80a49c5 [file] [log] [blame]
Dan Gohman171c11e2008-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
Dan Gohmanae3a0be2009-06-04 22:49:04 +00009 %t = fadd float %s, 1.0
Dan Gohman171c11e2008-04-16 02:32:24 +000010 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}