34 lines · plain
1; RUN: opt -passes='simple-loop-unswitch<nontrivial>' < %s -S | FileCheck %s2 3; CHECK: if.end{{.*}}:4; CHECK-NOT: if.end{{.*}}:5declare i32 @__gxx_wasm_personality_v0(...)6 7declare void @foo()8 9define void @test(i1 %arg) personality ptr @__gxx_wasm_personality_v0 {10entry:11 br label %while.body12 13while.body: ; preds = %cleanup, %entry14 br i1 %arg, label %if.end, label %if.then15 16if.then: ; preds = %while.body17 br label %if.end18 19if.end: ; preds = %if.then, %while.body20 invoke void @foo()21 to label %cleanup unwind label %catch.dispatch22 23catch.dispatch: ; preds = %invoke.cont, %if.end24 %0 = catchswitch within none [label %catch] unwind to caller25 26catch: ; preds = %catch.dispatch27 %1 = catchpad within %0 [ptr null]28 unreachable29 30cleanup: ; preds = %invoke.cont31 br label %while.body32}33 34