1 ; RUN: opt -disable-output "-passes=print<scalar-evolution>,print<scalar-evolution>" < %s 2>&1 | FileCheck %s
3 define void @bad.nsw() {
4 ; CHECK-LABEL: Classifying expressions for: @bad.nsw
5 ; CHECK-LABEL: Classifying expressions for: @bad.nsw
10 %i = phi i8 [ -1, %entry ], [ %i.inc, %loop ]
11 ; CHECK: %i = phi i8 [ -1, %entry ], [ %i.inc, %loop ]
12 ; CHECK-NEXT: --> {-1,+,-128}<nw><%loop>
13 ; CHECK-NOT: --> {-1,+,-128}<nsw><%loop>
15 %counter = phi i8 [ 0, %entry ], [ %counter.inc, %loop ]
17 %i.inc = add i8 %i, -128
18 %i.sext = sext i8 %i to i16
20 %counter.inc = add i8 %counter, 1
21 %continue = icmp eq i8 %counter, 1
22 br i1 %continue, label %exit, label %loop