Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/ScalarRepl/load-store-aggregate.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 95c75e76d11b |
children |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
9 %struct.foo = type { i32, i32 } | 9 %struct.foo = type { i32, i32 } |
10 | 10 |
11 define i32 @test(%struct.foo* %P) { | 11 define i32 @test(%struct.foo* %P) { |
12 entry: | 12 entry: |
13 %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] | 13 %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] |
14 %V = load %struct.foo* %P | 14 %V = load %struct.foo, %struct.foo* %P |
15 store %struct.foo %V, %struct.foo* %L | 15 store %struct.foo %V, %struct.foo* %L |
16 | 16 |
17 %tmp4 = getelementptr %struct.foo* %L, i32 0, i32 0 ; <i32*> [#uses=1] | 17 %tmp4 = getelementptr %struct.foo, %struct.foo* %L, i32 0, i32 0 ; <i32*> [#uses=1] |
18 %tmp5 = load i32* %tmp4 ; <i32> [#uses=1] | 18 %tmp5 = load i32, i32* %tmp4 ; <i32> [#uses=1] |
19 ret i32 %tmp5 | 19 ret i32 %tmp5 |
20 } | 20 } |
21 | 21 |
22 define %struct.foo @test2(i32 %A, i32 %B) { | 22 define %struct.foo @test2(i32 %A, i32 %B) { |
23 entry: | 23 entry: |
24 %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] | 24 %L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2] |
25 %L.0 = getelementptr %struct.foo* %L, i32 0, i32 0 | 25 %L.0 = getelementptr %struct.foo, %struct.foo* %L, i32 0, i32 0 |
26 store i32 %A, i32* %L.0 | 26 store i32 %A, i32* %L.0 |
27 %L.1 = getelementptr %struct.foo* %L, i32 0, i32 1 | 27 %L.1 = getelementptr %struct.foo, %struct.foo* %L, i32 0, i32 1 |
28 store i32 %B, i32* %L.1 | 28 store i32 %B, i32* %L.1 |
29 %V = load %struct.foo* %L | 29 %V = load %struct.foo, %struct.foo* %L |
30 ret %struct.foo %V | 30 ret %struct.foo %V |
31 } | 31 } |