aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/SimplifyCFG/commondest-loopid.ll
blob: 6a32f95a4960086ec73f703383a390a6ee6a1c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s
;
; Ensure that the loop metadata is preserved when converting the
; conditional branch to an unconditional.

define void @commondest_loopid(i1 %T) {
; CHECK-LABEL: @commondest_loopid(
; CHECK: !llvm.loop !0
; CHECK: !0 = distinct !{!0, !1}
; CHECK: !1 = !{!"loopprop"}
entry:
        br label %loop

loop:
        br i1 %T, label %loop, label %loop, !llvm.loop !0
}

!0 = distinct !{!0, !1}
!1 = !{!"loopprop"}