1; RUN: llc < %s
2; PR1228
3
4	%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
5	%"struct.std::locale" = type { %"struct.std::locale::_Impl"* }
6	%"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** }
7	%"struct.std::locale::facet" = type { i32 (...)**, i32 }
8	%"struct.std::string" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
9
10define void @_ZNKSt6locale4nameEv(%"struct.std::string"* %agg.result) personality i32 (...)* @__gxx_personality_v0 {
11entry:
12	%tmp105 = icmp eq i8* null, null		; <i1> [#uses=1]
13	br i1 %tmp105, label %cond_true, label %cond_true222
14
15cond_true:		; preds = %entry
16	invoke void @_ZNSs14_M_replace_auxEjjjc( )
17			to label %cond_next1328 unwind label %cond_true1402
18
19cond_true222:		; preds = %cond_true222, %entry
20	%tmp207 = call i32 @strcmp( )		; <i32> [#uses=1]
21	%tmp208 = icmp eq i32 %tmp207, 0		; <i1> [#uses=2]
22	%bothcond1480 = and i1 %tmp208, false		; <i1> [#uses=1]
23	br i1 %bothcond1480, label %cond_true222, label %cond_next226.loopexit
24
25cond_next226.loopexit:		; preds = %cond_true222
26	%phitmp = xor i1 %tmp208, true		; <i1> [#uses=1]
27	br i1 %phitmp, label %cond_false280, label %cond_true235
28
29cond_true235:		; preds = %cond_next226.loopexit
30	invoke void @_ZNSs6assignEPKcj( )
31			to label %cond_next1328 unwind label %cond_true1402
32
33cond_false280:		; preds = %cond_next226.loopexit
34	invoke void @_ZNSs7reserveEj( )
35			to label %invcont282 unwind label %cond_true1402
36
37invcont282:		; preds = %cond_false280
38	invoke void @_ZNSs6appendEPKcj( )
39			to label %invcont317 unwind label %cond_true1402
40
41invcont317:		; preds = %invcont282
42	ret void
43
44cond_next1328:		; preds = %cond_true235, %cond_true
45	ret void
46
47cond_true1402:		; preds = %invcont282, %cond_false280, %cond_true235, %cond_true
48  %lpad = landingpad { i8*, i32 }
49            cleanup
50  ret void
51}
52
53declare void @_ZNSs14_M_replace_auxEjjjc()
54
55declare i32 @strcmp()
56
57declare void @_ZNSs6assignEPKcj()
58
59declare void @_ZNSs7reserveEj()
60
61declare void @_ZNSs6appendEPKcj()
62
63declare i32 @__gxx_personality_v0(...)
64