1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=inline < %s | FileCheck %s
4 ; Check that the exception handling code is fully pruned, and does not
5 ; leave behind invalid IR.
7 define internal void @foo(i1 %arg) personality ptr undef {
9 br i1 false, label %join, label %split
15 %phi = phi i64 [ 1, %split ], [ 0, %entry ]
16 %cmp = icmp ugt i64 1, %phi
17 br i1 %cmp, label %invoke1, label %exit
21 to label %exit unwind label %cleanup1
24 %pad1 = cleanuppad within none []
25 br label %cleanup1.cont
28 br i1 %arg, label %cleanupret, label %invoke2
31 invoke void undef() [ "funclet"(token %pad1) ]
32 to label %cleanup1.cont unwind label %cleanup2
35 %pad2 = cleanuppad within %pad1 []
45 define void @test() personality ptr undef {
47 ; CHECK-NEXT: ret void