llvm.org GIT mirror llvm / a510a1c
Add file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138083 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 8 years ago
1 changed file(s) with 162 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: opt -O2 %s -S -o - | FileCheck %s
1
2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
3 target triple = "x86_64-apple-darwin11.1"
4
5 %"struct.boost::compressed_pair" = type { %"struct.boost::details::compressed_pair_imp" }
6 %"struct.boost::details::compressed_pair_imp" = type { i32 }
7 %struct.empty_base_t = type <{ i8 }>
8 %struct.empty_t = type <{ i8 }>
9
10 @.str = private constant [25 x i8] c"x.second() was clobbered\00", align 1 ; <[25 x i8]*> [#uses=1]
11
12 define i32 @main(i32 %argc, i8** %argv) ssp {
13 entry:
14 %argc_addr = alloca i32, align 4 ; [#uses=1]
15 %argv_addr = alloca i8**, align 8 ; [#uses=1]
16 %retval = alloca i32 ; [#uses=2]
17 %0 = alloca i32 ; [#uses=2]
18 %retval.1 = alloca i8 ; [#uses=2]
19 %1 = alloca %struct.empty_base_t ; <%struct.empty_base_t*> [#uses=1]
20 %2 = alloca %struct.empty_base_t* ; <%struct.empty_base_t**> [#uses=1]
21 %x = alloca %"struct.boost::compressed_pair" ; <%"struct.boost::compressed_pair"*> [#uses=3]
22 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
23 store i32 %argc, i32* %argc_addr
24 store i8** %argv, i8*** %argv_addr
25 %3 = call i32* @_ZN5boost15compressed_pairI7empty_tiE6secondEv(%"struct.boost::compressed_pair"* %x) ssp ; [#uses=1]
26 store i32 -3, i32* %3, align 4
27 %4 = call %struct.empty_base_t* @_ZN5boost15compressed_pairI7empty_tiE5firstEv(%"struct.boost::compressed_pair"* %x) ssp ; <%struct.empty_base_t*> [#uses=1]
28 store %struct.empty_base_t* %4, %struct.empty_base_t** %2, align 8
29 call void @_ZN7empty_tC1Ev(%struct.empty_base_t* %1) nounwind
30 %5 = call i32* @_ZN5boost15compressed_pairI7empty_tiE6secondEv(%"struct.boost::compressed_pair"* %x) ssp ; [#uses=1]
31 %6 = load i32* %5, align 4 ; [#uses=1]
32 %7 = icmp ne i32 %6, -3 ; [#uses=1]
33 %8 = zext i1 %7 to i8 ; [#uses=1]
34 store i8 %8, i8* %retval.1, align 1
35 %9 = load i8* %retval.1, align 1 ; [#uses=1]
36 %toBool = icmp ne i8 %9, 0 ; [#uses=1]
37 br i1 %toBool, label %bb, label %bb1
38
39 bb: ; preds = %entry
40 %10 = call i32 @puts(i8* getelementptr inbounds ([25 x i8]* @.str, i64 0, i64 0)) ; [#uses=0]
41 call void @abort() noreturn
42 unreachable
43
44 bb1: ; preds = %entry
45 store i32 0, i32* %0, align 4
46 %11 = load i32* %0, align 4 ; [#uses=1]
47 store i32 %11, i32* %retval, align 4
48 br label %return
49
50 ; CHECK-NOT: x.second() was clobbered
51 ; CHECK: ret i32
52 return: ; preds = %bb1
53 %retval2 = load i32* %retval ; [#uses=1]
54 ret i32 %retval2
55 }
56
57 define linkonce_odr void @_ZN12empty_base_tC2Ev(%struct.empty_base_t* %this) nounwind ssp align 2 {
58 entry:
59 %this_addr = alloca %struct.empty_base_t*, align 8 ; <%struct.empty_base_t**> [#uses=1]
60 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
61 store %struct.empty_base_t* %this, %struct.empty_base_t** %this_addr
62 br label %return
63
64 return: ; preds = %entry
65 ret void
66 }
67
68 define linkonce_odr void @_ZN7empty_tC1Ev(%struct.empty_base_t* %this) nounwind ssp align 2 {
69 entry:
70 %this_addr = alloca %struct.empty_base_t*, align 8 ; <%struct.empty_base_t**> [#uses=2]
71 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
72 store %struct.empty_base_t* %this, %struct.empty_base_t** %this_addr
73 %0 = load %struct.empty_base_t** %this_addr, align 8 ; <%struct.empty_base_t*> [#uses=1]
74 call void @_ZN12empty_base_tC2Ev(%struct.empty_base_t* %0) nounwind
75 br label %return
76
77 return: ; preds = %entry
78 ret void
79 }
80
81 define linkonce_odr i32* @_ZN5boost7details19compressed_pair_impI7empty_tiLi1EE6secondEv(%"struct.boost::details::compressed_pair_imp"* %this) nounwind ssp align 2 {
82 entry:
83 %this_addr = alloca %"struct.boost::details::compressed_pair_imp"*, align 8 ; <%"struct.boost::details::compressed_pair_imp"**> [#uses=2]
84 %retval = alloca i32* ; [#uses=2]
85 %0 = alloca i32* ; [#uses=2]
86 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
87 store %"struct.boost::details::compressed_pair_imp"* %this, %"struct.boost::details::compressed_pair_imp"** %this_addr
88 %1 = load %"struct.boost::details::compressed_pair_imp"** %this_addr, align 8 ; <%"struct.boost::details::compressed_pair_imp"*> [#uses=1]
89 %2 = getelementptr inbounds %"struct.boost::details::compressed_pair_imp"* %1, i32 0, i32 0 ; [#uses=1]
90 store i32* %2, i32** %0, align 8
91 %3 = load i32** %0, align 8 ; [#uses=1]
92 store i32* %3, i32** %retval, align 8
93 br label %return
94
95 return: ; preds = %entry
96 %retval1 = load i32** %retval ; [#uses=1]
97 ret i32* %retval1
98 }
99
100 define linkonce_odr i32* @_ZN5boost15compressed_pairI7empty_tiE6secondEv(%"struct.boost::compressed_pair"* %this) ssp align 2 {
101 entry:
102 %this_addr = alloca %"struct.boost::compressed_pair"*, align 8 ; <%"struct.boost::compressed_pair"**> [#uses=2]
103 %retval = alloca i32* ; [#uses=2]
104 %0 = alloca i32* ; [#uses=2]
105 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
106 store %"struct.boost::compressed_pair"* %this, %"struct.boost::compressed_pair"** %this_addr
107 %1 = load %"struct.boost::compressed_pair"** %this_addr, align 8 ; <%"struct.boost::compressed_pair"*> [#uses=1]
108 %2 = getelementptr inbounds %"struct.boost::compressed_pair"* %1, i32 0, i32 0 ; <%"struct.boost::details::compressed_pair_imp"*> [#uses=1]
109 %3 = call i32* @_ZN5boost7details19compressed_pair_impI7empty_tiLi1EE6secondEv(%"struct.boost::details::compressed_pair_imp"* %2) nounwind ; [#uses=1]
110 store i32* %3, i32** %0, align 8
111 %4 = load i32** %0, align 8 ; [#uses=1]
112 store i32* %4, i32** %retval, align 8
113 br label %return
114
115 return: ; preds = %entry
116 %retval1 = load i32** %retval ; [#uses=1]
117 ret i32* %retval1
118 }
119
120 define linkonce_odr %struct.empty_base_t* @_ZN5boost7details19compressed_pair_impI7empty_tiLi1EE5firstEv(%"struct.boost::details::compressed_pair_imp"* %this) nounwind ssp align 2 {
121 entry:
122 %this_addr = alloca %"struct.boost::details::compressed_pair_imp"*, align 8 ; <%"struct.boost::details::compressed_pair_imp"**> [#uses=2]
123 %retval = alloca %struct.empty_base_t* ; <%struct.empty_base_t**> [#uses=2]
124 %0 = alloca %struct.empty_base_t* ; <%struct.empty_base_t**> [#uses=2]
125 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
126 store %"struct.boost::details::compressed_pair_imp"* %this, %"struct.boost::details::compressed_pair_imp"** %this_addr
127 %1 = load %"struct.boost::details::compressed_pair_imp"** %this_addr, align 8 ; <%"struct.boost::details::compressed_pair_imp"*> [#uses=1]
128 %2 = bitcast %"struct.boost::details::compressed_pair_imp"* %1 to %struct.empty_base_t* ; <%struct.empty_base_t*> [#uses=1]
129 store %struct.empty_base_t* %2, %struct.empty_base_t** %0, align 8
130 %3 = load %struct.empty_base_t** %0, align 8 ; <%struct.empty_base_t*> [#uses=1]
131 store %struct.empty_base_t* %3, %struct.empty_base_t** %retval, align 8
132 br label %return
133
134 return: ; preds = %entry
135 %retval1 = load %struct.empty_base_t** %retval ; <%struct.empty_base_t*> [#uses=1]
136 ret %struct.empty_base_t* %retval1
137 }
138
139 define linkonce_odr %struct.empty_base_t* @_ZN5boost15compressed_pairI7empty_tiE5firstEv(%"struct.boost::compressed_pair"* %this) ssp align 2 {
140 entry:
141 %this_addr = alloca %"struct.boost::compressed_pair"*, align 8 ; <%"struct.boost::compressed_pair"**> [#uses=2]
142 %retval = alloca %struct.empty_base_t* ; <%struct.empty_base_t**> [#uses=2]
143 %0 = alloca %struct.empty_base_t* ; <%struct.empty_base_t**> [#uses=2]
144 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
145 store %"struct.boost::compressed_pair"* %this, %"struct.boost::compressed_pair"** %this_addr
146 %1 = load %"struct.boost::compressed_pair"** %this_addr, align 8 ; <%"struct.boost::compressed_pair"*> [#uses=1]
147 %2 = getelementptr inbounds %"struct.boost::compressed_pair"* %1, i32 0, i32 0 ; <%"struct.boost::details::compressed_pair_imp"*> [#uses=1]
148 %3 = call %struct.empty_base_t* @_ZN5boost7details19compressed_pair_impI7empty_tiLi1EE5firstEv(%"struct.boost::details::compressed_pair_imp"* %2) nounwind ; <%struct.empty_base_t*> [#uses=1]
149 store %struct.empty_base_t* %3, %struct.empty_base_t** %0, align 8
150 %4 = load %struct.empty_base_t** %0, align 8 ; <%struct.empty_base_t*> [#uses=1]
151 store %struct.empty_base_t* %4, %struct.empty_base_t** %retval, align 8
152 br label %return
153
154 return: ; preds = %entry
155 %retval1 = load %struct.empty_base_t** %retval ; <%struct.empty_base_t*> [#uses=1]
156 ret %struct.empty_base_t* %retval1
157 }
158
159 declare i32 @puts(i8*)
160
161 declare void @abort() noreturn