1 ; RUN: opt < %s -S -loop-unroll -mtriple aarch64 -mcpu=cortex-a57 | FileCheck %s
3 ; Partial unroll 8 times for this loop.
4 define void @unroll1() nounwind {
9 %iv = phi i32 [ 0, %entry ], [ %inc, %loop ]
11 %exitcnd = icmp uge i32 %inc, 1024
12 br i1 %exitcnd, label %exit, label %loop
28 ; Partial unroll 16 times for this loop.
29 define void @unroll2() nounwind {
34 %iv1 = phi i32 [ 0, %entry ], [ %inc1, %loop1.latch ]
35 br label %loop2.header
41 %iv2 = phi i32 [ 0, %loop2.header ], [ %inc2, %loop2 ]
42 %inc2 = add i32 %iv2, 1
43 %exitcnd2 = icmp uge i32 %inc2, 1024
44 br i1 %exitcnd2, label %exit2, label %loop2
50 %inc1 = add i32 %iv1, 1
51 %exitcnd1 = icmp uge i32 %inc1, 1024
52 br i1 %exitcnd2, label %exit, label %loop1