blob: 53a6ffbf9823d2f516a265df7f32974db5ee0213 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; The loop canonicalization pass should guarantee that there is one backedge
2; for all loops. This allows the -indvars pass to recognize the %IV
3; induction variable in this testcase.
4
5; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
6
7int %test(bool %C) {
8 br label %Loop
9Loop:
10 %IV = phi uint [1, %0], [%IV2, %BE1], [%IV2, %BE2]
11 %IV2 = add uint %IV, 2
12 br bool %C, label %BE1, label %BE2
13BE1:
14 br label %Loop
15BE2:
16 br label %Loop
17}