1 ; RUN: llvm-as< %s | llc -march=x86 -mcpu=yonah &&
2 ; RUN: llvm-as< %s | llc -march=x86 -mcpu=yonah | not grep sub.*esp
4 ; This checks that various insert/extract idiom work without going to the
8 void %test(<4 x float>* %F, float %f) {
10 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
11 %tmp3 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
12 %tmp10 = insertelement <4 x float> %tmp3, float %f, uint 0 ; <<4 x float>> [#uses=2]
13 %tmp6 = add <4 x float> %tmp10, %tmp10 ; <<4 x float>> [#uses=1]
14 store <4 x float> %tmp6, <4 x float>* %F
18 void %test2(<4 x float>* %F, float %f) {
20 %G = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
21 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
22 %tmp3 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
23 store <4 x float> %tmp3, <4 x float>* %G
24 %tmp = getelementptr <4 x float>* %G, int 0, int 2 ; <float*> [#uses=1]
25 store float %f, float* %tmp
26 %tmp4 = load <4 x float>* %G ; <<4 x float>> [#uses=2]
27 %tmp6 = add <4 x float> %tmp4, %tmp4 ; <<4 x float>> [#uses=1]
28 store <4 x float> %tmp6, <4 x float>* %F
32 void %test3(<4 x float>* %F, float* %f) {
34 %G = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
35 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
36 %tmp3 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
37 store <4 x float> %tmp3, <4 x float>* %G
38 %tmp = getelementptr <4 x float>* %G, int 0, int 2 ; <float*> [#uses=1]
39 %tmp = load float* %tmp ; <float> [#uses=1]
40 store float %tmp, float* %f
44 void %test4(<4 x float>* %F, float* %f) {
46 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
47 %tmp5.lhs = extractelement <4 x float> %tmp, uint 0 ; <float> [#uses=1]
48 %tmp5.rhs = extractelement <4 x float> %tmp, uint 0 ; <float> [#uses=1]
49 %tmp5 = add float %tmp5.lhs, %tmp5.rhs ; <float> [#uses=1]
50 store float %tmp5, float* %f