comparison test/Analysis/BasicAA/byval.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
4 %struct.x = type { i32, i32, i32, i32 } 4 %struct.x = type { i32, i32, i32, i32 }
5 @g = weak global i32 0 ; <i32*> [#uses=1] 5 @g = weak global i32 0 ; <i32*> [#uses=1]
6 6
7 define i32 @foo(%struct.x* byval %a) nounwind { 7 define i32 @foo(%struct.x* byval %a) nounwind {
8 ; CHECK: ret i32 1 8 ; CHECK: ret i32 1
9 %tmp1 = tail call i32 (...)* @bar( %struct.x* %a ) nounwind ; <i32> [#uses=0] 9 %tmp1 = tail call i32 (...) @bar( %struct.x* %a ) nounwind ; <i32> [#uses=0]
10 %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 ; <i32*> [#uses=2] 10 %tmp2 = getelementptr %struct.x, %struct.x* %a, i32 0, i32 0 ; <i32*> [#uses=2]
11 store i32 1, i32* %tmp2, align 4 11 store i32 1, i32* %tmp2, align 4
12 store i32 2, i32* @g, align 4 12 store i32 2, i32* @g, align 4
13 %tmp4 = load i32* %tmp2, align 4 ; <i32> [#uses=1] 13 %tmp4 = load i32, i32* %tmp2, align 4 ; <i32> [#uses=1]
14 ret i32 %tmp4 14 ret i32 %tmp4
15 } 15 }
16 16
17 declare i32 @bar(...) 17 declare i32 @bar(...)
18 18