1 ; RUN: opt -loop-unroll -verify-loop-lcssa -S < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 @b = external local_unnamed_addr global i32, align 4
9 ; CHECK: exit.loopexit:
10 ; CHECK: {{.*}} = phi i32 [ %d.0, %h3 ]
11 ; CHECK: br label %exit
12 ; CHECK: exit.loopexit1:
13 ; CHECK: {{.*}} = phi i32 [ %d.0, %h3.1 ]
14 ; CHECK: br label %exit
16 define void @main() local_unnamed_addr #0 {
21 %d.0 = phi i32 [ %1, %latch1 ], [ undef, %ph1 ]
28 %0 = phi i32 [ 0, %ph2 ], [ %inc, %latch2 ]
32 br i1 undef, label %latch3, label %exit
35 br i1 false, label %exit3, label %h3
41 %inc = add nuw nsw i32 %0, 1
42 %cmp = icmp slt i32 %inc, 2
43 br i1 %cmp, label %h2, label %exit2
46 br i1 undef, label %latch1, label %ph2
48 latch1: ; preds = %exit2
49 %1 = load i32, i32* @b, align 4
53 %d.0.lcssa = phi i32 [ %d.0, %h3 ]