1 ; RUN: opt < %s -S -passes=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
21 ; Partial unroll 16 times for this loop.
22 define void @unroll2() nounwind {
27 %iv1 = phi i32 [ 0, %entry ], [ %inc1, %loop1.latch ]
28 br label %loop2.header
34 %iv2 = phi i32 [ 0, %loop2.header ], [ %inc2, %loop2 ]
35 %inc2 = add i32 %iv2, 1
36 %exitcnd2 = icmp uge i32 %inc2, 1024
37 br i1 %exitcnd2, label %exit2, label %loop2
43 %inc1 = add i32 %iv1, 1
44 %exitcnd1 = icmp uge i32 %inc1, 1024
45 br i1 %exitcnd2, label %exit, label %loop1
53 ; CHECK: add{{.*}}, 16