xref: /llvm-project/llvm/test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll (revision 4ab40eca080965c65802710e39adbb78c4ce7bde)
1; RUN: opt < %s -passes=instcombine -disable-output
2; PR2303
3	%"struct.std::ctype<char>" = type { %"struct.std::locale::facet", ptr, i8, ptr, ptr, ptr, i8, [256 x i8], [256 x i8], i8 }
4	%"struct.std::locale::facet" = type { ptr, i32 }
5
6declare ptr @_ZNSt6locale5facet15_S_get_c_localeEv()
7
8declare ptr @__ctype_toupper_loc() readnone
9
10declare ptr @__ctype_tolower_loc() readnone
11
12define void @_ZNSt5ctypeIcEC2EPiPKtbm(ptr %this, ptr %unnamed_arg, ptr %__table, i8 zeroext  %__del, i64 %__refs) personality ptr @__gxx_personality_v0 {
13entry:
14	%tmp8 = invoke ptr @_ZNSt6locale5facet15_S_get_c_localeEv( )
15			to label %invcont unwind label %lpad		; <ptr> [#uses=0]
16
17invcont:		; preds = %entry
18	%tmp32 = invoke ptr @__ctype_toupper_loc( ) readnone
19			to label %invcont31 unwind label %lpad		; <ptr> [#uses=0]
20
21invcont31:		; preds = %invcont
22	%tmp38 = invoke ptr @__ctype_tolower_loc( ) readnone
23			to label %invcont37 unwind label %lpad		; <ptr> [#uses=1]
24
25invcont37:		; preds = %invcont31
26	%tmp39 = load ptr, ptr %tmp38, align 8		; <ptr> [#uses=1]
27	%tmp41 = getelementptr %"struct.std::ctype<char>", ptr %this, i32 0, i32 4		; <ptr> [#uses=1]
28	store ptr %tmp39, ptr %tmp41, align 8
29	ret void
30
31lpad:		; preds = %invcont31, %invcont, %entry
32        %exn = landingpad {ptr, i32}
33                 cleanup
34	unreachable
35}
36
37declare i32 @__gxx_personality_v0(...)
38