Xamarin Public Jenkins (auto-signing) f32dbaf0b2 Imported Upstream version 5.18.0.225
Former-commit-id: 10196d987d5fc5564b9d3b33b1fdf13190f4d0b5
2018-12-21 19:01:49 +00:00

23 lines
553 B
LLVM

; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
define void @foo([7 x i8]* %a) {
; CHECK-LABEL: @foo
entry:
br label %bb
bb:
%idx = phi i64 [ 0, %entry ], [ %idx.incr, %bb ]
%i = udiv i64 %idx, 7
%j = urem i64 %idx, 7
%a.ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 %i, i64 %j
; CHECK: %a.ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 %i, i64 %j
; CHECK-NEXT: --> {%a,+,1}<nw><%bb>
%val = load i8, i8* %a.ptr
%idx.incr = add i64 %idx, 1
%test = icmp ne i64 %idx.incr, 35
br i1 %test, label %bb, label %exit
exit:
ret void
}