reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
; RUN: opt -S < %s -loop-unroll -block-freq | FileCheck %s
; RUN: opt -S < %s -passes='require<opt-remark-emit>,unroll,require<block-freq>' | FileCheck %s
; Crasher from PR20987.

; CHECK: define void @update_loop_info_in_subloops
; CHECK: entry:
; CHECK: L:
; CHECK: L.inner:
; CHECK: L.inner.latch:
; CHECK: L.latch:
; CHECK: L.inner.1:
; CHECK: L.inner.latch.1:
; CHECK: L.latch.1:

define void @update_loop_info_in_subloops() {
entry:
  br label %L

L:
  %0 = phi i64 [ 1, %entry ], [ %1, %L.latch ]
  br label %L.inner

L.inner:
  br label %L.inner.latch

L.inner.latch:
  br i1 false, label %L.latch, label %L.inner

L.latch:
  %1 = add i64 %0, 1
  %2 = icmp eq i64 %1, 3
  br i1 %2, label %exit, label %L

exit:
  ret void
}