23 lines · plain
1; RUN: opt < %s "-passes=print<scalar-evolution>" -disable-output 2>&1 | FileCheck %s2 3define void @foo(ptr %a) {4; CHECK-LABEL: @foo5entry:6 br label %bb7 8bb:9 %idx = phi i64 [ 0, %entry ], [ %idx.incr, %bb ]10 %i = udiv i64 %idx, 711 %j = urem i64 %idx, 712 %a.ptr = getelementptr [7 x i8], ptr %a, i64 %i, i64 %j13; CHECK: %a.ptr = getelementptr [7 x i8], ptr %a, i64 %i, i64 %j14; CHECK-NEXT: --> {%a,+,1}<nw><%bb>15 %val = load i8, ptr %a.ptr16 %idx.incr = add i64 %idx, 117 %test = icmp ne i64 %idx.incr, 3518 br i1 %test, label %bb, label %exit19 20exit:21 ret void22}23