1; RUN: opt -analyze -scalar-evolution < %s  -o - -S | FileCheck %s
2
3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.9.0"
5
6; Test that SCEV is capable of figuring out value of 'IV' that actually does not change.
7; CHECK: Classifying expressions for: @foo
8; CHECK: %iv.i = phi i64
9; CHECK: -5 U: [-5,-4) S: [-5,-4)         Exits: -5               LoopDispositions: { %loop: Invariant }
10define void @foo() {
11entry:
12  br label %loop
13
14loop:
15  %iv.i = phi i64 [ -5, %entry ], [ %iv.next.i, %loop ]
16  %iv.next.i = add nsw i64 %iv.i, 0
17  br label %loop
18}
19