1 ; RUN: llc -mtriple=i686-linux < %s | FileCheck %s
4 define i32 @bar(i32 %count) {
5 ; Test checks that basic block backedge2 is not moved before header,
6 ; because it can't reduce taken branches.
7 ; Later backedge1 and backedge2 is rotated before loop header.
15 %c = shl nsw i32 %count, 2
19 %val1 = call i32 @foo()
20 %cond1 = icmp sgt i32 %val1, 1
21 br i1 %cond1, label %.exit, label %.backedge1
24 %val2 = call i32 @foo()
25 %cond2 = icmp sgt i32 %val2, 1
26 br i1 %cond2, label %.header, label %.backedge2
29 %val3 = call i32 @foo()