-; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output \
-; RUN: -scalar-evolution-max-iterations=0 | \
-; RUN: grep -F "backedge-taken count is (-2147483632 + (2147483632 smax (-1 + (-1 * %x)) smax (-1 + (-1 * %y))))"
+; RUN: opt < %s -analyze -scalar-evolution \
+; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
; PR2607
-define i32 @b(i32 %x, i32 %y) {
+define i32 @b(i32 %x, i32 %y) nounwind {
entry:
%cmp2 = icmp slt i32 %y, %x
%cond3 = select i1 %cmp2, i32 %y, i32 %x
%j.0.lcssa = phi i32 [ -2147483632, %entry ], [ %dec, %forinc ]
ret i32 %j.0.lcssa
}
+
+; CHECK: backedge-taken count is (-2147483632 + ((-1 + (-1 * %{{[xy]}})) smax (-1 + (-1 * %{{[xy]}}))))
+