brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4769c52 Raw
56 lines · plain
1; RUN: opt < %s -skip-partial-inlining-cost-analysis -passes=partial-inliner -S  | FileCheck %s2 3declare dso_local void @bar()4declare dso_local i32 @__CxxFrameHandler3(...)5 6define internal void @callee(i1 %cond) personality ptr @__CxxFrameHandler3 {7entry:8  br i1 %cond, label %if.then, label %if.end9 10if.then:11  invoke void @bar()12          to label %invoke.cont unwind label %ehcleanup13 14invoke.cont:15  br label %try.cont16 17ehcleanup:18  %0 = cleanuppad within none []19  cleanupret from %0 unwind label %catch.dispatch20 21catch.dispatch:22  %1 = catchswitch within none [label %catch] unwind to caller23 24catch:25  %2 = catchpad within %1 [ptr null, i32 64, ptr null]26  catchret from %2 to label %catchret.dest27 28catchret.dest:29  br label %try.cont30 31try.cont:32  br label %if.end33 34if.end:35  ret void36}37 38define internal void @caller(i1 %cond) {39; CHECK-LABEL: define {{.*}} @caller40entry:41; CHECK: entry:42; CHECK-NEXT: br i143; CHECK: codeRepl.i:44; CHECK-NEXT: call void @callee.1.{{.*}}()45  call void @callee(i1 %cond)46  ret void47}48 49; CHECK-LABEL: define {{.*}} @callee.1.{{.*}}() personality ptr @__CxxFrameHandler350; CHECK: invoke void @bar()51; CHECK: cleanuppad52; CHECK-NEXT: cleanupret53; CHECK: catchswitch54; CHECK: catchpad55; CHECK-NEXT: catchret56