1 ; RUN: opt -S < %s -loop-unroll -block-freq | FileCheck %s 2 ; Crasher from PR20987. 3 4 ; CHECK: define void @update_loop_info_in_subloops 5 ; CHECK: entry: 6 ; CHECK: L: 7 ; CHECK: L.inner: 8 ; CHECK: L.inner.latch: 9 ; CHECK: L.latch: 10 ; CHECK: L.inner.1: 11 ; CHECK: L.inner.latch.1: 12 ; CHECK: L.latch.1: 13 14 define void @update_loop_info_in_subloops() { 15 entry: 16 br label %L 17 18 L: 19 %0 = phi i64 [ 1, %entry ], [ %1, %L.latch ] 20 br label %L.inner 21 22 L.inner: 23 br label %L.inner.latch 24 25 L.inner.latch: 26 br i1 false, label %L.latch, label %L.inner 27 28 L.latch: 29 %1 = add i64 %0, 1 30 %2 = icmp eq i64 %1, 3 31 br i1 %2, label %exit, label %L 32 33 exit: 34 ret void 35 } 36