Now that PR2957 is resolved, remove a bunch of
[llvm/msp430.git] / test / Analysis / ScalarEvolution / 2009-01-02-SignedNegativeStride.ll
blob07714cd1b50777656cf10d44c0d348c6c524298d
1 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution | not grep {/u -1}
2 ; PR3275
4 @g_16 = external global i16             ; <i16*> [#uses=3]
5 @.str = external constant [4 x i8]              ; <[4 x i8]*> [#uses=0]
7 define void @func_15() nounwind {
8 entry:
9         %0 = load i16* @g_16, align 2           ; <i16> [#uses=1]
10         %1 = icmp sgt i16 %0, 0         ; <i1> [#uses=1]
11         br i1 %1, label %bb2, label %bb.nph
13 bb.nph:         ; preds = %entry
14         %g_16.promoted = load i16* @g_16                ; <i16> [#uses=1]
15         br label %bb
17 bb:             ; preds = %bb1, %bb.nph
18         %g_16.tmp.0 = phi i16 [ %g_16.promoted, %bb.nph ], [ %2, %bb1 ]         ; <i16> [#uses=1]
19         %2 = add i16 %g_16.tmp.0, -1            ; <i16> [#uses=3]
20         br label %bb1
22 bb1:            ; preds = %bb
23         %3 = icmp sgt i16 %2, 0         ; <i1> [#uses=1]
24         br i1 %3, label %bb1.bb2_crit_edge, label %bb
26 bb1.bb2_crit_edge:              ; preds = %bb1
27         store i16 %2, i16* @g_16
28         br label %bb2
30 bb2:            ; preds = %bb1.bb2_crit_edge, %entry
31         br label %return
33 return:         ; preds = %bb2
34         ret void
37 declare i32 @main() nounwind
39 declare i32 @printf(i8*, ...) nounwind