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