1 ; RUN: opt -loop-unroll -S %s | FileCheck %s
5 ; for (int i=v; i<=v+1; ++i)
9 ; We can use the nsw information to see that the tripcount will be 2, so the
10 ; loop should be unrolled as this is always beneficial
15 define void @test1(i32 %v) {
17 %add = add nsw i32 %v, 1
21 %i.04 = phi i32 [ %v, %entry ], [ %inc, %for.body ]
22 tail call void @f(i32 %i.04)
23 %inc = add nsw i32 %i.04, 1
24 %cmp = icmp slt i32 %i.04, %add
25 br i1 %cmp, label %for.body, label %for.end