1 ; RUN: opt < %s -simplifycfg -S | FileCheck %s
3 ;; Test case for bug 25299, contributed by David Majnemer.
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
8 define void @f(i1 %B) personality i1 undef {
11 ;CHECK-NEXT: call void @g()
13 to label %continue unwind label %unwind
15 unwind: ; preds = %entry
16 %tmp101 = landingpad { i8*, i32 }
18 br i1 %B, label %resume, label %then
20 then: ; preds = %cleanup1
23 resume: ; preds = %cleanup2, %then, %cleanup1, %unwind
24 %tmp104 = phi { i8*, i32 } [ %tmp101, %then ], [ %tmp106, %cleanup2 ], [ %tmp101, %unwind ]
25 ;CHECK-NOT: resume { i8*, i32 } %tmp104
26 resume { i8*, i32 } %tmp104
28 continue: ; preds = %entry, %continue
29 ;CHECK: continue: ; preds = %entry, %continue
30 ;CHECK-NEXT: call void @g()
32 to label %continue unwind label %cleanup2
34 cleanup2: ; preds = %continue
35 %tmp106 = landingpad { i8*, i32 }