1; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
2; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-max-iterations=0 2>&1 | FileCheck %s
3; PR1533
4
5@array = weak global [101 x i32] zeroinitializer, align 32		; <[100 x i32]*> [#uses=1]
6
7; CHECK: Loop %bb: backedge-taken count is 100
8
9define void @loop(i32 %x) {
10entry:
11	br label %bb
12
13bb:		; preds = %bb, %entry
14	%i.01.0 = phi i32 [ 100, %entry ], [ %tmp4, %bb ]		; <i32> [#uses=2]
15	%tmp1 = getelementptr [101 x i32], [101 x i32]* @array, i32 0, i32 %i.01.0		; <i32*> [#uses=1]
16	store i32 %x, i32* %tmp1
17	%tmp4 = add i32 %i.01.0, -1		; <i32> [#uses=2]
18	%tmp7 = icmp sgt i32 %tmp4, -1		; <i1> [#uses=1]
19	br i1 %tmp7, label %bb, label %return
20
21return:		; preds = %bb
22	ret void
23}
24