Run this through -simplifycfg and -mem2reg to test only what we need to test.
[oota-llvm.git] / test / CodeGen / X86 / sse41-extractps-bitcast-1.ll
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
9   %t = add float %s, 1.0
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 }