diff --git a/llvm/test/Other/2009-03-31-CallGraph.ll b/llvm/test/Other/2009-03-31-CallGraph.ll index 189c408d74c8..54f2691eed55 100644 --- a/llvm/test/Other/2009-03-31-CallGraph.ll +++ b/llvm/test/Other/2009-03-31-CallGraph.ll @@ -1,36 +1,36 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 define void @f2() personality i32 (...)* @__gxx_personality_v0 { invoke void @f6() to label %ok1 unwind label %lpad1 ok1: ret void lpad1: landingpad {i8*, i32} cleanup invoke void @f4() to label %ok2 unwind label %lpad2 ok2: call void @f8() unreachable lpad2: %exn = landingpad {i8*, i32} cleanup unreachable } declare void @f3() define void @f4() { call void @f3() ret void } declare void @f6() nounwind declare void @f8() declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll b/llvm/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll index fabad30bb5ac..d194ab062e04 100644 --- a/llvm/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll +++ b/llvm/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll @@ -1,11 +1,11 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 define linkonce void @caller() { call void @callee( ) ret void } define linkonce void @callee() { ret void } diff --git a/llvm/test/Transforms/Inline/2006-01-14-CallGraphUpdate.ll b/llvm/test/Transforms/Inline/2006-01-14-CallGraphUpdate.ll index 415495eb515d..7e38da2b5fbc 100644 --- a/llvm/test/Transforms/Inline/2006-01-14-CallGraphUpdate.ll +++ b/llvm/test/Transforms/Inline/2006-01-14-CallGraphUpdate.ll @@ -1,25 +1,25 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 %"struct.std::__codecvt_abstract_base" = type { %"struct.std::locale::facet" } %"struct.std::basic_streambuf >" = type { i32 (...)**, i32*, i32*, i32*, i32*, i32*, i32*, %"struct.std::locale" } %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"struct.std::locale" } %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 } %"struct.std::ios_base::_Words" = type { i8*, i32 } %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } %"struct.std::locale::facet" = type { i32 (...)**, i32 } %"struct.std::ostreambuf_iterator >" = type { %"struct.std::basic_streambuf >"*, i32 } define void @_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewl(%"struct.std::ostreambuf_iterator >"* %agg.result, %"struct.std::__codecvt_abstract_base"* %this, %"struct.std::basic_streambuf >"* %__s.0__, i32 %__s.1__, %"struct.std::ios_base"* %__io, i32 %__fill, i32 %__v) { entry: tail call fastcc void @_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_( ) ret void } define fastcc void @_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_() { entry: %tmp.38 = shl i32 0, 3 ; [#uses=1] %tmp.39 = alloca i8, i32 %tmp.38 ; [#uses=0] ret void } diff --git a/llvm/test/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll b/llvm/test/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll index a0ddacdbd5b1..f7fd4e6c851e 100644 --- a/llvm/test/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll +++ b/llvm/test/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll @@ -1,840 +1,840 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 ; PR827 @_ZTV8CRjii = internal global [1 x i32 (...)*] [ i32 (...)* @_ZN8CRjii12NlFeeEPN5Jr7sE ] ; <[1 x i32 (...)*]*> [#uses=0] define internal i32 @_ZN8CRjii12NlFeeEPN5Jr7sE(...) { entry: br i1 false, label %cond_true, label %cond_false179 cond_true: ; preds = %entry br label %bb9 bb: ; preds = %cond_true14 br label %bb9 bb9: ; preds = %bb, %cond_true br i1 false, label %cond_true14, label %cond_false cond_true14: ; preds = %bb9 br label %bb cond_false: ; preds = %bb9 br label %bb15 cond_next: ; No predecessors! br label %bb15 bb15: ; preds = %cond_next, %cond_false br label %bb24 bb17: ; preds = %cond_true29 br label %bb24 bb24: ; preds = %bb17, %bb15 br i1 false, label %cond_true29, label %cond_false30 cond_true29: ; preds = %bb24 br label %bb17 cond_false30: ; preds = %bb24 br label %bb32 cond_next31: ; No predecessors! br label %bb32 bb32: ; preds = %cond_next31, %cond_false30 br label %bb41 bb34: ; preds = %cond_true46 br label %bb41 bb41: ; preds = %bb34, %bb32 br i1 false, label %cond_true46, label %cond_false47 cond_true46: ; preds = %bb41 br label %bb34 cond_false47: ; preds = %bb41 br label %bb49 cond_next48: ; No predecessors! br label %bb49 bb49: ; preds = %cond_next48, %cond_false47 br label %bb58 bb51: ; preds = %cond_true63 br label %bb58 bb58: ; preds = %bb51, %bb49 br i1 false, label %cond_true63, label %cond_false64 cond_true63: ; preds = %bb58 br label %bb51 cond_false64: ; preds = %bb58 br label %bb66 cond_next65: ; No predecessors! br label %bb66 bb66: ; preds = %cond_next65, %cond_false64 br label %bb76 bb68: ; preds = %cond_true81 br label %bb76 bb76: ; preds = %bb68, %bb66 br i1 false, label %cond_true81, label %cond_false82 cond_true81: ; preds = %bb76 br label %bb68 cond_false82: ; preds = %bb76 br label %bb84 cond_next83: ; No predecessors! br label %bb84 bb84: ; preds = %cond_next83, %cond_false82 br label %bb94 bb86: ; preds = %cond_true99 br label %bb94 bb94: ; preds = %bb86, %bb84 br i1 false, label %cond_true99, label %cond_false100 cond_true99: ; preds = %bb94 br label %bb86 cond_false100: ; preds = %bb94 br label %bb102 cond_next101: ; No predecessors! br label %bb102 bb102: ; preds = %cond_next101, %cond_false100 br label %bb112 bb104: ; preds = %cond_true117 br label %bb112 bb112: ; preds = %bb104, %bb102 br i1 false, label %cond_true117, label %cond_false118 cond_true117: ; preds = %bb112 br label %bb104 cond_false118: ; preds = %bb112 br label %bb120 cond_next119: ; No predecessors! br label %bb120 bb120: ; preds = %cond_next119, %cond_false118 br label %bb130 bb122: ; preds = %cond_true135 br label %bb130 bb130: ; preds = %bb122, %bb120 br i1 false, label %cond_true135, label %cond_false136 cond_true135: ; preds = %bb130 br label %bb122 cond_false136: ; preds = %bb130 br label %bb138 cond_next137: ; No predecessors! br label %bb138 bb138: ; preds = %cond_next137, %cond_false136 br label %bb148 bb140: ; preds = %cond_true153 call fastcc void @_Zjrf1( ) br label %bb148 bb148: ; preds = %bb140, %bb138 br i1 false, label %cond_true153, label %cond_false154 cond_true153: ; preds = %bb148 br label %bb140 cond_false154: ; preds = %bb148 br label %bb156 cond_next155: ; No predecessors! br label %bb156 bb156: ; preds = %cond_next155, %cond_false154 br label %bb166 bb158: ; preds = %cond_true171 br label %bb166 bb166: ; preds = %bb158, %bb156 br i1 false, label %cond_true171, label %cond_false172 cond_true171: ; preds = %bb166 br label %bb158 cond_false172: ; preds = %bb166 br label %bb174 cond_next173: ; No predecessors! br label %bb174 bb174: ; preds = %cond_next173, %cond_false172 br label %cleanup cleanup: ; preds = %bb174 br label %finally finally: ; preds = %cleanup br label %cond_next180 cond_false179: ; preds = %entry br label %cond_next180 cond_next180: ; preds = %cond_false179, %finally br label %return return: ; preds = %cond_next180 ret i32 0 } define internal fastcc void @_Zjrf2() { entry: br label %bb3 bb: ; preds = %cond_true br label %bb3 bb3: ; preds = %bb, %entry %tmp5 = load i8*, i8** null ; [#uses=1] %tmp = icmp ne i8* null, %tmp5 ; [#uses=1] br i1 %tmp, label %cond_true, label %cond_false cond_true: ; preds = %bb3 br label %bb cond_false: ; preds = %bb3 br label %bb6 cond_next: ; No predecessors! br label %bb6 bb6: ; preds = %cond_next, %cond_false br label %return return: ; preds = %bb6 ret void } define internal fastcc void @_Zjrf3() { entry: call fastcc void @_Zjrf2( ) br label %return return: ; preds = %entry ret void } define internal fastcc void @_Zjrf4() { entry: br label %bb6 bb: ; preds = %cond_true br label %bb6 bb6: ; preds = %bb, %entry br i1 false, label %cond_true, label %cond_false cond_true: ; preds = %bb6 br label %bb cond_false: ; preds = %bb6 br label %bb8 cond_next: ; No predecessors! br label %bb8 bb8: ; preds = %cond_next, %cond_false br i1 false, label %cond_true9, label %cond_false12 cond_true9: ; preds = %bb8 call fastcc void @_Zjrf3( ) br label %cond_next13 cond_false12: ; preds = %bb8 br label %cond_next13 cond_next13: ; preds = %cond_false12, %cond_true9 br label %return return: ; preds = %cond_next13 ret void } define internal fastcc void @_Zjrf5() { entry: call fastcc void @_Zjrf4( ) br label %return return: ; preds = %entry ret void } define internal fastcc void @_Zjrf6() { entry: call fastcc void @_Zjrf5( ) br label %return return: ; preds = %entry ret void } define internal fastcc void @_Zjrf7() { entry: br label %cleanup cleanup: ; preds = %entry br label %finally finally: ; preds = %cleanup call fastcc void @_Zjrf6( ) br label %cleanup9 cleanup9: ; preds = %finally br label %finally8 finally8: ; preds = %cleanup9 br label %cleanup11 cleanup11: ; preds = %finally8 br label %finally10 finally10: ; preds = %cleanup11 br label %finally23 finally23: ; preds = %finally10 br label %return return: ; preds = %finally23 ret void } define internal fastcc void @_Zjrf11() { entry: br label %bb7 bb: ; preds = %cond_true br label %bb7 bb7: ; preds = %bb, %entry br i1 false, label %cond_true, label %cond_false cond_true: ; preds = %bb7 br label %bb cond_false: ; preds = %bb7 br label %bb9 cond_next: ; No predecessors! br label %bb9 bb9: ; preds = %cond_next, %cond_false br label %return ; No predecessors! br i1 false, label %cond_true12, label %cond_false15 cond_true12: ; preds = %0 call fastcc void @_Zjrf3( ) br label %cond_next16 cond_false15: ; preds = %0 br label %cond_next16 cond_next16: ; preds = %cond_false15, %cond_true12 br label %return return: ; preds = %cond_next16, %bb9 ret void } define internal fastcc void @_Zjrf9() { entry: call fastcc void @_Zjrf11( ) br label %return return: ; preds = %entry ret void } define internal fastcc void @_Zjrf10() { entry: call fastcc void @_Zjrf9( ) br label %return return: ; preds = %entry ret void } define internal fastcc void @_Zjrf8() { entry: br i1 false, label %cond_true, label %cond_false201 cond_true: ; preds = %entry br i1 false, label %cond_true36, label %cond_false cond_true36: ; preds = %cond_true br label %cleanup cleanup: ; preds = %cond_true36 br label %finally finally: ; preds = %cleanup br label %cond_next189 cond_false: ; preds = %cond_true br i1 false, label %cond_true99, label %cond_false137 cond_true99: ; preds = %cond_false br label %cleanup136 cleanup136: ; preds = %cond_true99 br label %finally135 finally135: ; preds = %cleanup136 br label %cond_next cond_false137: ; preds = %cond_false call fastcc void @_Zjrf10( ) br label %cleanup188 cleanup188: ; preds = %cond_false137 br label %finally187 finally187: ; preds = %cleanup188 br label %cond_next cond_next: ; preds = %finally187, %finally135 br label %cond_next189 cond_next189: ; preds = %cond_next, %finally br label %cond_next202 cond_false201: ; preds = %entry br label %cond_next202 cond_next202: ; preds = %cond_false201, %cond_next189 br label %return return: ; preds = %cond_next202 ret void } define internal fastcc void @_Zjrf1() { entry: br label %bb492 bb: ; preds = %cond_true499 br label %cleanup cleanup: ; preds = %bb br label %finally finally: ; preds = %cleanup br label %cleanup11 cleanup11: ; preds = %finally br label %finally10 finally10: ; preds = %cleanup11 br i1 false, label %cond_true, label %cond_false286 cond_true: ; preds = %finally10 br label %cleanup26 cleanup26: ; preds = %cond_true br label %finally25 finally25: ; preds = %cleanup26 br label %bb30 bb27: ; preds = %cond_true37 br label %bb30 bb30: ; preds = %bb27, %finally25 br i1 false, label %cond_true37, label %cond_false cond_true37: ; preds = %bb30 br label %bb27 cond_false: ; preds = %bb30 br label %bb38 cond_next: ; No predecessors! br label %bb38 bb38: ; preds = %cond_next, %cond_false br label %bb148 bb40: ; preds = %cond_true156 br label %bb139 bb41: ; preds = %cond_true142 call fastcc void @_Zjrf7( ) br label %bb105 bb44: ; preds = %cond_true112 br label %bb74 bb66: ; preds = %cond_true80 br label %bb74 bb74: ; preds = %bb66, %bb44 br i1 false, label %cond_true80, label %cond_false81 cond_true80: ; preds = %bb74 br label %bb66 cond_false81: ; preds = %bb74 br label %bb83 cond_next82: ; No predecessors! br label %bb83 bb83: ; preds = %cond_next82, %cond_false81 br label %cleanup97 cleanup97: ; preds = %bb83 br label %finally96 finally96: ; preds = %cleanup97 br label %cleanup99 cleanup99: ; preds = %finally96 br label %finally98 finally98: ; preds = %cleanup99 br label %bb105 bb105: ; preds = %finally98, %bb41 br i1 false, label %cond_true112, label %cond_false113 cond_true112: ; preds = %bb105 br label %bb44 cond_false113: ; preds = %bb105 br label %bb115 cond_next114: ; No predecessors! br label %bb115 bb115: ; preds = %cond_next114, %cond_false113 br i1 false, label %cond_true119, label %cond_false123 cond_true119: ; preds = %bb115 call fastcc void @_Zjrf8( ) br label %cond_next124 cond_false123: ; preds = %bb115 br label %cond_next124 cond_next124: ; preds = %cond_false123, %cond_true119 br i1 false, label %cond_true131, label %cond_false132 cond_true131: ; preds = %cond_next124 br label %cleanup135 cond_false132: ; preds = %cond_next124 br label %cond_next133 cond_next133: ; preds = %cond_false132 br label %cleanup136 cleanup135: ; preds = %cond_true131 br label %done cleanup136: ; preds = %cond_next133 br label %finally134 finally134: ; preds = %cleanup136 br label %bb139 bb139: ; preds = %finally134, %bb40 br i1 false, label %cond_true142, label %cond_false143 cond_true142: ; preds = %bb139 br label %bb41 cond_false143: ; preds = %bb139 br label %bb145 cond_next144: ; No predecessors! br label %bb145 bb145: ; preds = %cond_next144, %cond_false143 br label %bb148 bb148: ; preds = %bb145, %bb38 br i1 false, label %cond_true156, label %cond_false157 cond_true156: ; preds = %bb148 br label %bb40 cond_false157: ; preds = %bb148 br label %bb159 cond_next158: ; No predecessors! br label %bb159 bb159: ; preds = %cond_next158, %cond_false157 br label %done done: ; preds = %bb159, %cleanup135 br label %bb214 bb185: ; preds = %cond_true218 br i1 false, label %cond_true193, label %cond_false206 cond_true193: ; preds = %bb185 br label %cond_next211 cond_false206: ; preds = %bb185 br label %cond_next211 cond_next211: ; preds = %cond_false206, %cond_true193 br label %bb214 bb214: ; preds = %cond_next211, %done br i1 false, label %cond_true218, label %cond_false219 cond_true218: ; preds = %bb214 br label %bb185 cond_false219: ; preds = %bb214 br label %bb221 cond_next220: ; No predecessors! br label %bb221 bb221: ; preds = %cond_next220, %cond_false219 br i1 false, label %cond_true236, label %cond_false245 cond_true236: ; preds = %bb221 br label %cond_next249 cond_false245: ; preds = %bb221 br label %cond_next249 cond_next249: ; preds = %cond_false245, %cond_true236 br i1 false, label %cond_true272, label %cond_false277 cond_true272: ; preds = %cond_next249 br label %cond_next278 cond_false277: ; preds = %cond_next249 br label %cond_next278 cond_next278: ; preds = %cond_false277, %cond_true272 br label %cleanup285 cleanup285: ; preds = %cond_next278 br label %finally284 finally284: ; preds = %cleanup285 br label %cond_next287 cond_false286: ; preds = %finally10 br label %cond_next287 cond_next287: ; preds = %cond_false286, %finally284 br i1 false, label %cond_true317, label %cond_false319 cond_true317: ; preds = %cond_next287 br label %cond_next321 cond_false319: ; preds = %cond_next287 br label %cond_next321 cond_next321: ; preds = %cond_false319, %cond_true317 br label %bb348 bb335: ; preds = %cond_true355 br label %bb348 bb348: ; preds = %bb335, %cond_next321 br i1 false, label %cond_true355, label %cond_false356 cond_true355: ; preds = %bb348 br label %bb335 cond_false356: ; preds = %bb348 br label %bb358 cond_next357: ; No predecessors! br label %bb358 bb358: ; preds = %cond_next357, %cond_false356 br i1 false, label %cond_true363, label %cond_false364 cond_true363: ; preds = %bb358 br label %bb388 cond_false364: ; preds = %bb358 br label %cond_next365 cond_next365: ; preds = %cond_false364 br i1 false, label %cond_true370, label %cond_false371 cond_true370: ; preds = %cond_next365 br label %bb388 cond_false371: ; preds = %cond_next365 br label %cond_next372 cond_next372: ; preds = %cond_false371 br i1 false, label %cond_true385, label %cond_false386 cond_true385: ; preds = %cond_next372 br label %bb388 cond_false386: ; preds = %cond_next372 br label %cond_next387 cond_next387: ; preds = %cond_false386 br label %bb389 bb388: ; preds = %cond_true385, %cond_true370, %cond_true363 br label %bb389 bb389: ; preds = %bb388, %cond_next387 br i1 false, label %cond_true392, label %cond_false443 cond_true392: ; preds = %bb389 br label %bb419 bb402: ; preds = %cond_true425 br i1 false, label %cond_true406, label %cond_false412 cond_true406: ; preds = %bb402 br label %cond_next416 cond_false412: ; preds = %bb402 br label %cond_next416 cond_next416: ; preds = %cond_false412, %cond_true406 br label %bb419 bb419: ; preds = %cond_next416, %cond_true392 br i1 false, label %cond_true425, label %cond_false426 cond_true425: ; preds = %bb419 br label %bb402 cond_false426: ; preds = %bb419 br label %bb428 cond_next427: ; No predecessors! br label %bb428 bb428: ; preds = %cond_next427, %cond_false426 br label %cond_next478 cond_false443: ; preds = %bb389 br label %bb460 bb450: ; preds = %cond_true466 br label %bb460 bb460: ; preds = %bb450, %cond_false443 br i1 false, label %cond_true466, label %cond_false467 cond_true466: ; preds = %bb460 br label %bb450 cond_false467: ; preds = %bb460 br label %bb469 cond_next468: ; No predecessors! br label %bb469 bb469: ; preds = %cond_next468, %cond_false467 br label %cond_next478 cond_next478: ; preds = %bb469, %bb428 br label %cleanup485 cleanup485: ; preds = %cond_next478 br label %finally484 finally484: ; preds = %cleanup485 br label %cleanup487 cleanup487: ; preds = %finally484 br label %finally486 finally486: ; preds = %cleanup487 br label %cleanup489 cleanup489: ; preds = %finally486 br label %finally488 finally488: ; preds = %cleanup489 br label %bb492 bb492: ; preds = %finally488, %entry br i1 false, label %cond_true499, label %cond_false500 cond_true499: ; preds = %bb492 br label %bb cond_false500: ; preds = %bb492 br label %bb502 cond_next501: ; No predecessors! br label %bb502 bb502: ; preds = %cond_next501, %cond_false500 br label %return return: ; preds = %bb502 ret void } define internal fastcc void @_ZSt26__unguarded_insertion_sortIN9__gnu_cxx17__normal_iteratorIPSsSt6vectorISsSaISsEEEEEvT_S7_() { entry: br label %bb12 bb: ; preds = %cond_true br label %cleanup cleanup: ; preds = %bb br label %finally finally: ; preds = %cleanup br label %bb12 bb12: ; preds = %finally, %entry br i1 false, label %cond_true, label %cond_false cond_true: ; preds = %bb12 br label %bb cond_false: ; preds = %bb12 br label %bb14 cond_next: ; No predecessors! br label %bb14 bb14: ; preds = %cond_next, %cond_false br label %return return: ; preds = %bb14 ret void } diff --git a/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll b/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll index b4d630d8e386..c1e7c2ee3bf6 100644 --- a/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll +++ b/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll @@ -1,252 +1,252 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 ; PR993 target datalayout = "e-p:32:32" target triple = "i386-unknown-openbsd3.9" %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" = type { i8* } %"struct.__gnu_cxx::char_producer" = type { i32 (...)** } %struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, i8*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } %struct.__sbuf = type { i8*, i32 } %"struct.std::__basic_file" = type { %struct.__sFILE*, i1 } %"struct.std::__codecvt_abstract_base" = type { %"struct.std::locale::facet" } %"struct.std::bad_alloc" = type { %"struct.__gnu_cxx::char_producer" } %"struct.std::basic_filebuf >" = type { %"struct.std::basic_streambuf >", i32, %"struct.std::__basic_file", i32, %union.__mbstate_t, %union.__mbstate_t, i8*, i32, i1, i1, i1, i1, i8, i8*, i8*, i1, %"struct.std::codecvt"*, i8*, i32, i8*, i8* } %"struct.std::basic_ios >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream >"*, i8, i1, %"struct.std::basic_streambuf >"*, %"struct.std::ctype"*, %"struct.std::__codecvt_abstract_base"*, %"struct.std::__codecvt_abstract_base"* } %"struct.std::basic_iostream >" = type { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer", %"struct.std::basic_ios >" } %"struct.std::basic_ofstream >" = type { %"struct.__gnu_cxx::char_producer", %"struct.std::basic_filebuf >", %"struct.std::basic_ios >" } %"struct.std::basic_ostream >" = type { i32 (...)**, %"struct.std::basic_ios >" } %"struct.std::basic_streambuf >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" } %"struct.std::basic_string,std::allocator >" = type { %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" } %"struct.std::basic_string,std::allocator >::_Rep" = type { %"struct.std::basic_string,std::allocator >::_Rep_base" } %"struct.std::basic_string,std::allocator >::_Rep_base" = type { i32, i32, i32 } %"struct.std::codecvt" = type { %"struct.std::__codecvt_abstract_base", i32* } %"struct.std::ctype" = type { %"struct.std::__codecvt_abstract_base", i32*, i1, i32*, i32*, i32* } %"struct.std::domain_error" = type { %"struct.std::logic_error" } %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %struct.__sbuf, [8 x %struct.__sbuf], i32, %struct.__sbuf*, %"struct.std::locale" } %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 } %"struct.std::ios_base::_Words" = type { i8*, i32 } %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } %"struct.std::locale::facet" = type { i32 (...)**, i32 } %"struct.std::logic_error" = type { %"struct.__gnu_cxx::char_producer", %"struct.std::basic_string,std::allocator >" } %union.__mbstate_t = type { i64, [120 x i8] } @.str_1 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] @.str_9 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] define void @main() { entry: call fastcc void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode( ) ret void } define fastcc void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode() { entry: %tmp.6 = icmp eq %"struct.std::basic_filebuf >"* null, null ; [#uses=1] br i1 %tmp.6, label %then, label %UnifiedReturnBlock then: ; preds = %entry tail call fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate( ) ret void UnifiedReturnBlock: ; preds = %entry ret void } define fastcc void @_ZN10__cxxabiv111__terminateEPFvvE() { entry: unreachable } define void @_ZNSdD0Ev() { entry: unreachable } define void @_ZThn8_NSdD1Ev() { entry: ret void } define void @_ZNSt13basic_filebufIcSt11char_traitsIcEED0Ev() { entry: ret void } define void @_ZNSt13basic_filebufIcSt11char_traitsIcEE9pbackfailEi() { entry: unreachable } define fastcc void @_ZNSoD2Ev() { entry: unreachable } define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev() { entry: unreachable } define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate() { entry: tail call fastcc void @_ZSt19__throw_ios_failurePKc( ) ret void } declare fastcc void @_ZNSaIcED1Ev() define fastcc void @_ZNSsC1EPKcRKSaIcE() { entry: tail call fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type( ) unreachable } define fastcc void @_ZSt14__convert_to_vIyEvPKcRT_RSt12_Ios_IostateRKPii() { entry: ret void } define fastcc void @_ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC1Ej() { entry: ret void } define fastcc void @_ZSt19__throw_ios_failurePKc() { entry: call fastcc void @_ZNSsC1EPKcRKSaIcE( ) unreachable } define void @_GLOBAL__D__ZSt23lexicographical_compareIPKaS1_EbT_S2_T0_S3_() { entry: ret void } define void @_ZNSt9bad_allocD1Ev() { entry: unreachable } define fastcc void @_ZSt19__throw_logic_errorPKc() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSt11logic_errorC1ERKSs( ) to label %try_exit.0 unwind label %try_catch.0 try_catch.0: ; preds = %entry %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn try_exit.0: ; preds = %entry unreachable } define fastcc void @_ZNSt11logic_errorC1ERKSs() { entry: call fastcc void @_ZNSsC1ERKSs( ) ret void } define void @_ZNSt12domain_errorD1Ev() { entry: unreachable } define fastcc void @_ZSt20__throw_length_errorPKc() { entry: call fastcc void @_ZNSt12length_errorC1ERKSs( ) unreachable } define fastcc void @_ZNSt12length_errorC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSsC1ERKSs( ) to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i invoke_catch.i: ; preds = %entry %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn _ZNSt11logic_errorC2ERKSs.exit: ; preds = %entry ret void } define fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE() { entry: call fastcc void @_ZSt20__throw_length_errorPKc( ) unreachable } define fastcc void @_ZNSs12_S_constructIN9__gnu_cxx17__normal_iteratorIPcSsEEEES2_T_S4_RKSaIcESt20forward_iterator_tag() { entry: unreachable } define fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type() { entry: br i1 false, label %then.1.i, label %endif.1.i then.1.i: ; preds = %entry call fastcc void @_ZSt19__throw_logic_errorPKc( ) br label %endif.1.i endif.1.i: ; preds = %then.1.i, %entry call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) unreachable } define fastcc void @_ZNSsC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( ) invoke fastcc void @_ZNSaIcEC1ERKS_( ) to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %entry %exn = landingpad {i8*, i32} catch i8* null call fastcc void @_ZNSaIcED1Ev( ) resume { i8*, i32 } %exn invoke_cont.1: ; preds = %entry call fastcc void @_ZNSaIcEC2ERKS_( ) ret void } define fastcc void @_ZNSaIcEC1ERKS_() { entry: ret void } define fastcc void @_ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_jc() { entry: ret void } define fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_() { entry: br i1 false, label %else.i, label %cond_true cond_true: ; preds = %entry ret void else.i: ; preds = %entry tail call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) unreachable } define fastcc void @_ZNSaIcEC2ERKS_() { entry: ret void } define fastcc void @_ZN9__gnu_cxx12__pool_allocILb1ELi0EE8allocateEj() { entry: ret void } define fastcc void @_ZN9__gnu_cxx12__pool_allocILb1ELi0EE9_S_refillEj() { entry: unreachable } declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll b/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll index 8a613e534c7c..e4323194f623 100644 --- a/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll +++ b/llvm/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll @@ -1,343 +1,343 @@ -; RUN: opt < %s -inline -prune-eh -disable-output +; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0 ; PR992 target datalayout = "e-p:32:32" target triple = "i686-pc-linux-gnu" %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] } %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } %"struct.__cxxabiv1::__array_type_info" = type { %"struct.std::type_info" } %"struct.__cxxabiv1::__si_class_type_info" = type { %"struct.__cxxabiv1::__array_type_info", %"struct.__cxxabiv1::__array_type_info"* } %"struct.__gnu_cxx::_Rope_rep_alloc_base, true>" = type { i32 } %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" = type { i8* } %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" = type { i32* } %"struct.__gnu_cxx::char_producer" = type { i32 (...)** } %"struct.__gnu_cxx::stdio_sync_filebuf >" = type { %"struct.std::basic_streambuf >", %struct._IO_FILE*, i32 } %"struct.__gnu_cxx::stdio_sync_filebuf >" = type { %"struct.std::basic_streambuf >", %struct._IO_FILE*, i32 } %struct.__locale_struct = type { [13 x %struct.locale_data*], i16*, i32*, i32*, [13 x i8*] } %struct.__mbstate_t = type { i32, %"struct.__gnu_cxx::_Rope_rep_alloc_base, true>" } %struct.locale_data = type opaque %"struct.std::__basic_file" = type { %struct._IO_FILE*, i1 } %"struct.std::__codecvt_abstract_base" = type { %"struct.std::locale::facet" } %"struct.std::basic_filebuf >" = type { %"struct.std::basic_streambuf >", i32, %"struct.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, i8*, i32, i1, i1, i1, i1, i8, i8*, i8*, i1, %"struct.std::codecvt"*, i8*, i32, i8*, i8* } %"struct.std::basic_filebuf >" = type { %"struct.std::basic_streambuf >", i32, %"struct.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, i32*, i32, i1, i1, i1, i1, i32, i32*, i32*, i1, %"struct.std::codecvt"*, i8*, i32, i8*, i8* } %"struct.std::basic_fstream >" = type { { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer" }, %"struct.std::basic_filebuf >", %"struct.std::basic_ios >" } %"struct.std::basic_fstream >" = type { { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer" }, %"struct.std::basic_filebuf >", %"struct.std::basic_ios >" } %"struct.std::basic_ios >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream >"*, i8, i1, %"struct.std::basic_streambuf >"*, %"struct.std::ctype"*, %"struct.std::__codecvt_abstract_base"*, %"struct.std::__codecvt_abstract_base"* } %"struct.std::basic_ios >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream >"*, i32, i1, %"struct.std::basic_streambuf >"*, %"struct.std::codecvt"*, %"struct.std::__codecvt_abstract_base"*, %"struct.std::__codecvt_abstract_base"* } %"struct.std::basic_iostream >" = type { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer", %"struct.std::basic_ios >" } %"struct.std::basic_ostream >" = type { i32 (...)**, %"struct.std::basic_ios >" } %"struct.std::basic_ostream >" = type { i32 (...)**, %"struct.std::basic_ios >" } %"struct.std::basic_streambuf >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" } %"struct.std::basic_streambuf >" = type { i32 (...)**, i32*, i32*, i32*, i32*, i32*, i32*, %"struct.std::locale" } %"struct.std::basic_string,std::allocator >" = type { %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" } %"struct.std::basic_string,std::allocator >::_Rep" = type { %"struct.std::basic_string,std::allocator >::_Rep_base" } %"struct.std::basic_string,std::allocator >::_Rep_base" = type { i32, i32, i32 } %"struct.std::basic_string,std::allocator >" = type { %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" } %"struct.std::codecvt" = type { %"struct.std::__codecvt_abstract_base", %struct.__locale_struct* } %"struct.std::collate" = type { %"struct.std::locale::facet", %struct.__locale_struct* } %"struct.std::collate_byname" = type { %"struct.std::collate" } %"struct.std::ctype" = type { %"struct.std::__codecvt_abstract_base", %struct.__locale_struct*, i1, i32*, i32*, i16* } %"struct.std::ctype_byname" = type { %"struct.std::ctype" } %"struct.std::domain_error" = type { %"struct.std::logic_error" } %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"struct.std::locale" } %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 } %"struct.std::ios_base::_Words" = type { i8*, i32 } %"struct.std::istreambuf_iterator >" = type { %"struct.std::basic_streambuf >"*, i32 } %"struct.std::istreambuf_iterator >" = type { %"struct.std::basic_streambuf >"*, i32 } %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } %"struct.std::locale::facet" = type { i32 (...)**, i32 } %"struct.std::logic_error" = type { %"struct.__gnu_cxx::char_producer", %"struct.std::basic_string,std::allocator >" } %"struct.std::type_info" = type { i32 (...)**, i8* } @.str_11 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] @.str_9 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] @.str_1 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] define void @main() { entry: tail call fastcc void @_ZNSolsEi( ) ret void } define fastcc void @_ZNSolsEi() { entry: %tmp.22 = icmp eq i32 0, 0 ; [#uses=1] br i1 %tmp.22, label %else, label %then then: ; preds = %entry ret void else: ; preds = %entry tail call fastcc void @_ZNSolsEl( ) ret void } define void @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_() { entry: ret void } define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate() { entry: tail call fastcc void @_ZSt19__throw_ios_failurePKc( ) ret void } define fastcc void @_ZNSo3putEc() { entry: ret void } define fastcc void @_ZNSolsEl() { entry: %tmp.21.i = icmp eq %"struct.std::basic_ostream >"* null, null ; [#uses=1] br i1 %tmp.21.i, label %endif.0.i, label %shortcirc_next.i shortcirc_next.i: ; preds = %entry ret void endif.0.i: ; preds = %entry call fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate( ) ret void } define fastcc void @_ZSt19__throw_ios_failurePKc() { entry: call fastcc void @_ZNSsC1EPKcRKSaIcE( ) ret void } define fastcc void @_ZNSt8ios_baseD2Ev() { entry: unreachable } define void @_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv() { entry: unreachable } define void @_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEED1Ev() { entry: unreachable } define void @_ZNSt15basic_streambufIcSt11char_traitsIcEE6setbufEPci() { entry: ret void } define fastcc void @_ZSt9use_facetISt5ctypeIcEERKT_RKSt6locale() { entry: ret void } declare fastcc void @_ZNSaIcED1Ev() define fastcc void @_ZSt19__throw_logic_errorPKc() { entry: call fastcc void @_ZNSt11logic_errorC1ERKSs( ) ret void } define fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE() { entry: br i1 false, label %then.0, label %endif.0 then.0: ; preds = %entry call fastcc void @_ZSt20__throw_length_errorPKc( ) ret void endif.0: ; preds = %entry ret void } define fastcc void @_ZSt20__throw_length_errorPKc() { entry: call fastcc void @_ZNSt12length_errorC1ERKSs( ) ret void } define fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type() { entry: br i1 false, label %then.1.i, label %endif.1.i then.1.i: ; preds = %entry call fastcc void @_ZSt19__throw_logic_errorPKc( ) ret void endif.1.i: ; preds = %entry call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) unreachable } define fastcc void @_ZNSsC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( ) invoke fastcc void @_ZNSaIcEC1ERKS_( ) to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %entry %exn = landingpad {i8*, i32} catch i8* null call fastcc void @_ZNSaIcED1Ev( ) resume { i8*, i32 } %exn invoke_cont.1: ; preds = %entry call fastcc void @_ZNSaIcEC2ERKS_( ) ret void } define fastcc void @_ZNSs7reserveEj() { entry: ret void } define fastcc void @_ZNSaIcEC1ERKS_() { entry: ret void } define fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_() { entry: br i1 false, label %else.i, label %cond_true cond_true: ; preds = %entry ret void else.i: ; preds = %entry tail call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) ret void } define fastcc void @_ZNSsC1EPKcRKSaIcE() { entry: tail call fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type( ) unreachable } define fastcc void @_ZNSaIcEC2ERKS_() { entry: ret void } define void @_ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev() { entry: unreachable } define void @_ZNSt14collate_bynameIcED1Ev() { entry: unreachable } define void @_ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE6do_getES3_S3_RSt8ios_baseRSt12_Ios_IostateRy() { entry: ret void } define void @_ZNSt23__codecvt_abstract_baseIcc11__mbstate_tED1Ev() { entry: unreachable } define void @_ZNSt12ctype_bynameIcED0Ev() { entry: unreachable } define fastcc void @_ZNSt8messagesIwEC1Ej() { entry: ret void } define fastcc void @_ZSt14__convert_to_vIlEvPKcRT_RSt12_Ios_IostateRKP15__locale_structi() { entry: ret void } define fastcc void @_ZNSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEEC1Ej() { entry: ret void } define fastcc void @_ZNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC1Ej() { entry: ret void } define fastcc void @_ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE16_M_extract_floatES3_S3_RSt8ios_baseRSt12_Ios_IostateRSs() { entry: unreachable } define fastcc void @_ZNSbIwSt11char_traitsIwESaIwEE4swapERS2_() { entry: ret void } define void @_ZNSt14basic_iostreamIwSt11char_traitsIwEED0Ev() { entry: unreachable } define void @_ZNSt15basic_streambufIcSt11char_traitsIcEE9showmanycEv() { entry: ret void } define void @_ZNSt9exceptionD0Ev() { entry: unreachable } define fastcc void @_ZNSt11logic_errorC1ERKSs() { entry: call fastcc void @_ZNSsC1ERKSs( ) ret void } define fastcc void @_ZNSt11logic_errorD2Ev() { entry: unreachable } define fastcc void @_ZNSt12length_errorC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSsC1ERKSs( ) to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i invoke_catch.i: ; preds = %entry %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn _ZNSt11logic_errorC2ERKSs.exit: ; preds = %entry ret void } define void @_ZNK10__cxxabiv120__si_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_() { entry: ret void } define fastcc void @_ZNSbIwSt11char_traitsIwESaIwEE16_S_construct_auxIPKwEEPwT_S7_RKS1_12__false_type() { entry: ret void } define void @_ZTv0_n12_NSt13basic_fstreamIwSt11char_traitsIwEED1Ev() { entry: ret void } define void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev() { entry: unreachable } define fastcc void @_ZNSt5ctypeIcEC1EPKtbj() { entry: ret void } declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/JumpThreading/pr26096.ll b/llvm/test/Transforms/JumpThreading/pr26096.ll index 096d43e24d2c..e410bb4dd089 100644 --- a/llvm/test/Transforms/JumpThreading/pr26096.ll +++ b/llvm/test/Transforms/JumpThreading/pr26096.ll @@ -1,73 +1,73 @@ -; RUN: opt -prune-eh -inline -jump-threading -S < %s | FileCheck %s +; RUN: opt -prune-eh -inline -jump-threading -S -enable-new-pm=0 < %s | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @d = external global i32*, align 8 define void @fn3(i1 %B) { entry: br i1 %B, label %if.end, label %if.then if.then: ; preds = %entry call void @fn2(i1 %B) ret void if.end: ; preds = %entry call void @fn2(i1 %B) ret void } define internal void @fn2(i1 %B) unnamed_addr { entry: call void @fn1() call void @fn1() call void @fn1() br i1 %B, label %if.end, label %if.then if.then: unreachable if.end: unreachable } ; CHECK-LABEL: define internal void @fn2( ; CHECK: %[[LOAD:.*]] = load i32*, i32** @d, align 8 ; CHECK: %tobool1.i = icmp eq i32* %[[LOAD]], null define internal void @fn1() unnamed_addr { entry: br label %for.body for.body: ; preds = %entry %0 = load i32*, i32** @d, align 8 %tobool1 = icmp eq i32* %0, null br i1 %tobool1, label %cond.false, label %cond.end cond.false: ; preds = %for.body call void @__assert_fail(i8* null) unreachable cond.end: ; preds = %for.body %1 = load i32*, i32** @d, align 8 %cmp = icmp eq i32* %1, null br i1 %cmp, label %cond.end4, label %cond.false3 cond.false3: ; preds = %cond.end call void @__assert_fail(i8* null) unreachable cond.end4: ; preds = %cond.end call void @__assert_fail(i8* null) unreachable for.end: ; No predecessors! ret void } declare void @__assert_fail(i8*) ; Function Attrs: noreturn nounwind declare void @llvm.trap() #0 attributes #0 = { noreturn nounwind } diff --git a/llvm/test/Transforms/PruneEH/2008-06-02-Weak.ll b/llvm/test/Transforms/PruneEH/2008-06-02-Weak.ll index 6743606b1500..65f21c813218 100644 --- a/llvm/test/Transforms/PruneEH/2008-06-02-Weak.ll +++ b/llvm/test/Transforms/PruneEH/2008-06-02-Weak.ll @@ -1,20 +1,20 @@ -; RUN: opt < %s -prune-eh -S | FileCheck %s +; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s ; We should not infer 'nounwind' for/from a weak function, ; since it can be overriden by throwing implementation. ; ; CHECK-LABEL: define weak void @f() define weak void @f() { entry: ret void } ; CHECK-LABEL: define void @g() define void @g() { entry: call void @f() ret void } ; CHECK-NOT: {{^}}attributes #{{[0-9].*}} nounwind diff --git a/llvm/test/Transforms/PruneEH/ipo-nounwind.ll b/llvm/test/Transforms/PruneEH/ipo-nounwind.ll index 251bc08f3b0c..f618abd1d69c 100644 --- a/llvm/test/Transforms/PruneEH/ipo-nounwind.ll +++ b/llvm/test/Transforms/PruneEH/ipo-nounwind.ll @@ -1,44 +1,44 @@ -; RUN: opt -S -prune-eh < %s | FileCheck %s +; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s declare void @may_throw() ; @callee below may be an optimized form of this function, which can ; throw at runtime (see r265762 for more details): ; ; define linkonce_odr void @callee(i32* %ptr) noinline { ; entry: ; %val0 = load atomic i32, i32* %ptr unordered, align 4 ; %val1 = load atomic i32, i32* %ptr unordered, align 4 ; %cmp = icmp eq i32 %val0, %val1 ; br i1 %cmp, label %left, label %right ; left: ; ret void ; right: ; call void @may_throw() ; ret void ; } define linkonce_odr void @callee(i32* %ptr) noinline { ret void } define i32 @caller(i32* %ptr) personality i32 3 { ; CHECK-LABEL: @caller( ; CHECK: invoke void @callee(i32* %ptr) ; CHECK-NEXT: to label %normal unwind label %unwind entry: invoke void @callee(i32* %ptr) to label %normal unwind label %unwind normal: ret i32 1 unwind: %res = landingpad { i8*, i32 } cleanup ret i32 2 } diff --git a/llvm/test/Transforms/PruneEH/looptest.ll b/llvm/test/Transforms/PruneEH/looptest.ll index 2729ec933ca7..8be8ba81edab 100644 --- a/llvm/test/Transforms/PruneEH/looptest.ll +++ b/llvm/test/Transforms/PruneEH/looptest.ll @@ -1,44 +1,45 @@ -; RUN: opt < %s -prune-eh -S | FileCheck %s +; RUN: opt < %s -prune-eh -S -enable-new-pm=0 | FileCheck %s +; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s declare void @nounwind() nounwind define internal void @foo() { call void @nounwind() ret void } ; CHECK-LABEL: @caller define i32 @caller(i32 %n) personality i32 (...)* @__gxx_personality_v0 { entry: br label %for for: %j = phi i32 [0, %entry], [%j.inc, %inc] %j.cmp = icmp slt i32 %j, %n br i1 %j.cmp, label %body, label %exit, !llvm.loop !0 body: ; CHECK: call void @foo(), !llvm.mem.parallel_loop_access !0 invoke void @foo( ) to label %Normal unwind label %Except, !llvm.mem.parallel_loop_access !0 br label %inc inc: %j.inc = add nuw nsw i32 %j, 1 br label %for, !llvm.loop !0 exit: br label %Normal Normal: ret i32 0 Except: landingpad { i8*, i32 } catch i8* null ret i32 1 } declare i32 @__gxx_personality_v0(...) !0 = distinct !{!0} diff --git a/llvm/test/Transforms/PruneEH/musttail.ll b/llvm/test/Transforms/PruneEH/musttail.ll index 1ad607713c6d..1dfce4c4c6ce 100644 --- a/llvm/test/Transforms/PruneEH/musttail.ll +++ b/llvm/test/Transforms/PruneEH/musttail.ll @@ -1,15 +1,16 @@ -; RUN: opt -prune-eh -S < %s | FileCheck %s +; RUN: opt -prune-eh -enable-new-pm=0 -S < %s | FileCheck %s +; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s declare void @noreturn() define void @testfn() { ; A musttail call must be followed by (optional bitcast then) ret, ; so make sure we don't insert an unreachable ; CHECK: musttail call void @noreturn ; CHECK-NOT: unreachable ; CHECK-NEXT: ret void musttail call void @noreturn() #0 ret void } attributes #0 = { noreturn } diff --git a/llvm/test/Transforms/PruneEH/operand-bundles.ll b/llvm/test/Transforms/PruneEH/operand-bundles.ll index 112f4712238d..a64c97db36a0 100644 --- a/llvm/test/Transforms/PruneEH/operand-bundles.ll +++ b/llvm/test/Transforms/PruneEH/operand-bundles.ll @@ -1,27 +1,27 @@ -; RUN: opt < %s -prune-eh -S | FileCheck %s +; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s declare void @nounwind() nounwind define internal void @foo() { call void @nounwind() ret void } define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @caller( ; CHECK-NOT: invoke ; CHECK: call void @foo() [ "foo"(i32 0, i8 1) ] invoke void @foo() [ "foo"(i32 0, i8 1) ] to label %Normal unwind label %Except Normal: ; preds = %0 ret i32 0 Except: ; preds = %0 landingpad { i8*, i32 } catch i8* null ret i32 1 } declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/PruneEH/pr23971.ll b/llvm/test/Transforms/PruneEH/pr23971.ll index e23e8cb51251..4f4f1e42e354 100644 --- a/llvm/test/Transforms/PruneEH/pr23971.ll +++ b/llvm/test/Transforms/PruneEH/pr23971.ll @@ -1,22 +1,22 @@ -; RUN: opt -S -prune-eh < %s | FileCheck %s +; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define void @f() #0 { entry: call void asm sideeffect "ret\0A\09", "~{dirflag},~{fpsr},~{flags}"() unreachable } define i32 @g() { entry: call void @f() ret i32 42 } ; CHECK-LABEL: define i32 @g() ; CHECK: ret i32 42 attributes #0 = { naked noinline } diff --git a/llvm/test/Transforms/PruneEH/pr26263.ll b/llvm/test/Transforms/PruneEH/pr26263.ll index d1232abbc234..3ff8193f58db 100644 --- a/llvm/test/Transforms/PruneEH/pr26263.ll +++ b/llvm/test/Transforms/PruneEH/pr26263.ll @@ -1,70 +1,70 @@ ; PruneEH is less powerful than simplify-cfg in terms of cfg simplification, ; so it leaves some of the unreachable stuff hanging around. ; Checking it with CHECK-OLD. ; -; RUN: opt -prune-eh -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD +; RUN: opt -prune-eh -enable-new-pm=0 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD ; RUN: opt -passes='function-attrs,function(simplify-cfg)' -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NEW target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i386-pc-windows-msvc" declare void @neverthrows() nounwind define void @test1() personality i32 (...)* @__CxxFrameHandler3 { invoke void @neverthrows() to label %try.cont unwind label %cleanuppad try.cont: ret void cleanuppad: %cp = cleanuppad within none [] br label %cleanupret cleanupret: cleanupret from %cp unwind to caller } ; CHECK-LABEL: define void @test1( ; CHECK: call void @neverthrows() ; CHECK-NEW-NEXT: ret void ; CHECK-NEW-NEXT: } ; CHECK-OLD: ret void ; CHECK-OLD: %[[cp:.*]] = cleanuppad within none [] ; CHECK-OLD-NEXT: unreachable ; CHECK-OLD: cleanupret from %[[cp]] unwind to caller define void @test2() personality i32 (...)* @__CxxFrameHandler3 { invoke void @neverthrows() to label %try.cont unwind label %catchswitch try.cont: ret void catchswitch: %cs = catchswitch within none [label %catchpad] unwind to caller catchpad: %cp = catchpad within %cs [] unreachable ret: ret void } ; CHECK-LABEL: define void @test2( ; CHECK: call void @neverthrows() ; CHECK-NEW-NEXT: ret void ; CHECK-NEW-NEXT: } ; CHECK-OLD: ret void ; CHECK-OLD: %[[cs:.*]] = catchswitch within none [label ; CHECK-OLD: catchpad within %[[cs]] [] ; CHECK-OLD-NEXT: unreachable ; CHECK-OLD:ret void declare i32 @__CxxFrameHandler3(...) diff --git a/llvm/test/Transforms/PruneEH/recursivetest.ll b/llvm/test/Transforms/PruneEH/recursivetest.ll index 755f2518854b..9732b92e1ec1 100644 --- a/llvm/test/Transforms/PruneEH/recursivetest.ll +++ b/llvm/test/Transforms/PruneEH/recursivetest.ll @@ -1,30 +1,30 @@ -; RUN: opt < %s -prune-eh -S | FileCheck %s +; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s ; CHECK-LABEL: define internal i32 @foo() define internal i32 @foo() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-NOT: invoke i32 @foo() invoke i32 @foo( ) to label %Normal unwind label %Except ; :1 [#uses=0] Normal: ; preds = %0 ret i32 12 Except: ; preds = %0 landingpad { i8*, i32 } catch i8* null ret i32 123 } ; CHECK-LABEL: define i32 @caller() define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-NOT: invoke i32 @foo() invoke i32 @foo( ) to label %Normal unwind label %Except ; :1 [#uses=0] Normal: ; preds = %0 ret i32 0 Except: ; preds = %0 landingpad { i8*, i32 } catch i8* null ret i32 1 } declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/PruneEH/seh-nounwind.ll b/llvm/test/Transforms/PruneEH/seh-nounwind.ll index 7bc8f8068dc4..25c496cbf504 100644 --- a/llvm/test/Transforms/PruneEH/seh-nounwind.ll +++ b/llvm/test/Transforms/PruneEH/seh-nounwind.ll @@ -1,32 +1,32 @@ -; RUN: opt -S -prune-eh < %s | FileCheck %s +; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s ; Don't remove invokes of nounwind functions if the personality handles async ; exceptions. The @div function in this test can fault, even though it can't ; throw a synchronous exception. define i32 @div(i32 %n, i32 %d) nounwind { entry: %div = sdiv i32 %n, %d ret i32 %div } define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %call = invoke i32 @div(i32 10, i32 0) to label %__try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } catch i8* null br label %__try.cont __try.cont: %retval.0 = phi i32 [ %call, %entry ], [ 0, %lpad ] ret i32 %retval.0 } ; CHECK-LABEL: define i32 @main() ; CHECK: invoke i32 @div(i32 10, i32 0) declare i32 @__C_specific_handler(...) diff --git a/llvm/test/Transforms/PruneEH/simplenoreturntest.ll b/llvm/test/Transforms/PruneEH/simplenoreturntest.ll index ec5d100d7513..814f8b4a686f 100644 --- a/llvm/test/Transforms/PruneEH/simplenoreturntest.ll +++ b/llvm/test/Transforms/PruneEH/simplenoreturntest.ll @@ -1,13 +1,13 @@ -; RUN: opt < %s -prune-eh -S | not grep "ret i32" +; RUN: opt < %s -prune-eh -S -enable-new-pm=0 | not grep "ret i32" declare void @noreturn() noreturn define i32 @caller() { - call void @noreturn( ) + call void @noreturn() ret i32 17 } define i32 @caller2() { - %T = call i32 @caller( ) ; [#uses=1] + %T = call i32 @caller() ret i32 %T } diff --git a/llvm/test/Transforms/PruneEH/simpletest.ll b/llvm/test/Transforms/PruneEH/simpletest.ll index 720a85a3712b..8d427158d8ea 100644 --- a/llvm/test/Transforms/PruneEH/simpletest.ll +++ b/llvm/test/Transforms/PruneEH/simpletest.ll @@ -1,26 +1,26 @@ -; RUN: opt < %s -prune-eh -S | FileCheck %s +; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s declare void @nounwind() nounwind define internal void @foo() { call void @nounwind() ret void } ; CHECK-LABEL: define i32 @caller() define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-NOT: invoke void @foo invoke void @foo( ) to label %Normal unwind label %Except Normal: ; preds = %0 ret i32 0 Except: ; preds = %0 landingpad { i8*, i32 } catch i8* null ret i32 1 } declare i32 @__gxx_personality_v0(...)