Dan Gohman | 171c11e | 2008-04-16 02:32:24 +0000 | [diff] [blame] | 1 | ; 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 | |
| 7 | define float @bar(<4 x float> %v) { |
| 8 | %s = extractelement <4 x float> %v, i32 3 |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame^] | 9 | %t = fadd float %s, 1.0 |
Dan Gohman | 171c11e | 2008-04-16 02:32:24 +0000 | [diff] [blame] | 10 | ret float %t |
| 11 | } |
| 12 | define float @baz(<4 x float> %v) { |
| 13 | %s = extractelement <4 x float> %v, i32 3 |
| 14 | ret float %s |
| 15 | } |
| 16 | define i32 @qux(<4 x i32> %v) { |
| 17 | %i = extractelement <4 x i32> %v, i32 3 |
| 18 | ret i32 %i |
| 19 | } |