Rename the last test with .llx extension to .ll, resolve duplicate test by renaming...
[oota-llvm.git] / test / Transforms / ScalarRepl / vector_promote.ll
1 ; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | \
2 ; RUN:   not grep alloca
3 ; END.
4
5 define void @test(<4 x float>* %F, float %f) {
6 entry:
7         %G = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=3]
8         %tmp = load <4 x float>* %F             ; <<4 x float>> [#uses=2]
9         %tmp3 = add <4 x float> %tmp, %tmp              ; <<4 x float>> [#uses=1]
10         store <4 x float> %tmp3, <4 x float>* %G
11         %G.upgrd.1 = getelementptr <4 x float>* %G, i32 0, i32 0                ; <float*> [#uses=1]
12         store float %f, float* %G.upgrd.1
13         %tmp4 = load <4 x float>* %G            ; <<4 x float>> [#uses=2]
14         %tmp6 = add <4 x float> %tmp4, %tmp4            ; <<4 x float>> [#uses=1]
15         store <4 x float> %tmp6, <4 x float>* %F
16         ret void
17 }
18
19 define void @test2(<4 x float>* %F, float %f) {
20 entry:
21         %G = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=3]
22         %tmp = load <4 x float>* %F             ; <<4 x float>> [#uses=2]
23         %tmp3 = add <4 x float> %tmp, %tmp              ; <<4 x float>> [#uses=1]
24         store <4 x float> %tmp3, <4 x float>* %G
25         %tmp.upgrd.2 = getelementptr <4 x float>* %G, i32 0, i32 2              ; <float*> [#uses=1]
26         store float %f, float* %tmp.upgrd.2
27         %tmp4 = load <4 x float>* %G            ; <<4 x float>> [#uses=2]
28         %tmp6 = add <4 x float> %tmp4, %tmp4            ; <<4 x float>> [#uses=1]
29         store <4 x float> %tmp6, <4 x float>* %F
30         ret void
31 }
32
33 define void @test3(<4 x float>* %F, float* %f) {
34 entry:
35         %G = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=2]
36         %tmp = load <4 x float>* %F             ; <<4 x float>> [#uses=2]
37         %tmp3 = add <4 x float> %tmp, %tmp              ; <<4 x float>> [#uses=1]
38         store <4 x float> %tmp3, <4 x float>* %G
39         %tmp.upgrd.3 = getelementptr <4 x float>* %G, i32 0, i32 2              ; <float*> [#uses=1]
40         %tmp.upgrd.4 = load float* %tmp.upgrd.3         ; <float> [#uses=1]
41         store float %tmp.upgrd.4, float* %f
42         ret void
43 }
44
45 define void @test4(<4 x float>* %F, float* %f) {
46 entry:
47         %G = alloca <4 x float>, align 16               ; <<4 x float>*> [#uses=2]
48         %tmp = load <4 x float>* %F             ; <<4 x float>> [#uses=2]
49         %tmp3 = add <4 x float> %tmp, %tmp              ; <<4 x float>> [#uses=1]
50         store <4 x float> %tmp3, <4 x float>* %G
51         %G.upgrd.5 = getelementptr <4 x float>* %G, i32 0, i32 0                ; <float*> [#uses=1]
52         %tmp.upgrd.6 = load float* %G.upgrd.5           ; <float> [#uses=1]
53         store float %tmp.upgrd.6, float* %f
54         ret void
55 }