1; Catchswitch is interesting because reassociate previously tried to insert 2; into the catchswitch block, which is impossible. 3; 4; RUN: opt -reassociate -disable-output < %s 5; 6; ModuleID = 'bugpoint-reduced-simplified.bc' 7source_filename = "catchswitch.cpp" 8target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" 9target triple = "x86_64-pc-windows-msvc19.11.0" 10 11define dso_local void @"?f@@YAX_N@Z"(i1 %b) local_unnamed_addr #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { 12entry: 13 br i1 %b, label %if.then, label %if.else 14 15if.then: ; preds = %entry 16 invoke void @"?g@@YAXXZ"() 17 to label %cleanup unwind label %catch.dispatch 18 19if.else: ; preds = %entry 20 invoke void @"?g2@@YAXXZ"() 21 to label %cleanup unwind label %catch.dispatch 22 23catch.dispatch: ; preds = %if.else, %if.then 24 %z.0 = phi i32 [ 3, %if.then ], [ 5, %if.else ] 25 %0 = catchswitch within none [label %catch] unwind to caller 26 27catch: ; preds = %catch.dispatch 28 %1 = catchpad within %0 [i8* null, i32 64, i8* null] 29 %blech = sub nsw i32 5, %z.0 30 %sub = sub nsw i32 %blech, %z.0 31 call void @"?use@@YAXHH@Z"(i32 %z.0, i32 %sub) [ "funclet"(token %1) ] 32 unreachable 33 34cleanup: ; preds = %if.else, %if.then 35 ret void 36} 37 38declare dso_local void @"?g@@YAXXZ"() local_unnamed_addr #0 39 40declare dso_local i32 @__CxxFrameHandler3(...) 41 42declare dso_local void @"?g2@@YAXXZ"() local_unnamed_addr #0 43 44declare dso_local void @"?use@@YAXHH@Z"(i32, i32) local_unnamed_addr #0 45 46attributes #0 = { "use-soft-float"="false" } 47