1 ; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
3 %struct.job_pool.6.7 = type { i32 }
6 define dso_local void @f() {
10 for.cond: ; preds = %for.end, %entry
13 for.body: ; preds = %for.cond
16 if.then: ; No predecessors!
19 if.end: ; preds = %if.then, %for.body
20 br i1 false, label %for.body12.lr.ph, label %for.end
22 for.body12.lr.ph: ; preds = %if.end
25 for.body12: ; preds = %if.end40, %for.body12.lr.ph
28 if.then23: ; preds = %for.body12
29 br i1 undef, label %if.then24, label %if.else
31 if.then24: ; preds = %if.then23
32 %0 = load ptr, ptr undef, align 8
35 if.else: ; preds = %if.then23
36 %1 = load ptr, ptr undef, align 8
39 if.end40: ; preds = %if.else, %if.then24
40 br i1 false, label %for.body12, label %for.cond9.for.end_crit_edge
42 for.cond9.for.end_crit_edge: ; preds = %if.end40
45 for.end: ; preds = %for.cond9.for.end_crit_edge, %if.end
46 br i1 true, label %if.then45, label %for.cond
48 if.then45: ; preds = %for.end