1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -loop-sink -break-crit-edges -branch-prob -S | FileCheck %s
3 ; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S | FileCheck %s
4 ; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S | FileCheck %s
6 ; BreakCriticalEdges tries to update LI and DT if they are present. However,
7 ; updating LI actually needs a DT, so we now require DT in
8 ; BranchProbabilityInfo/LazyBlockFrequencyInfo/LazyBranchProbabilityInfo so it
9 ; is indeed available when LI is.
11 target triple = "x86_64-unknown-linux-gnu"
16 ; CHECK-NEXT: br label [[FOR_COND:%.*]]
18 ; CHECK-NEXT: br i1 false, label [[FOR_BODY:%.*]], label [[FOR_COND_FOR_END_CRIT_EDGE:%.*]]
19 ; CHECK: for.cond.for.end_crit_edge:
20 ; CHECK-NEXT: br label [[FOR_END:%.*]]
22 ; CHECK-NEXT: br i1 true, label [[FOR_ENDSPLIT:%.*]], label [[FOR_INC:%.*]]
24 ; CHECK-NEXT: br label [[FOR_COND]]
25 ; CHECK: for.endsplit:
26 ; CHECK-NEXT: br label [[FOR_END]]
28 ; CHECK-NEXT: ret void
33 for.cond: ; preds = %for.inc, %entry
34 br i1 undef, label %for.body, label %for.end
36 for.body: ; preds = %for.cond
37 br i1 undef, label %for.end, label %for.inc
39 for.inc: ; preds = %for.body
42 for.end: ; preds = %for.body, %for.cond