blob: 00ce2e91809c50fd0b9a1cc94a3261de5a5ce219 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -disable-output "-passes=print<da>" 2>&1 | FileCheck %s
; Test case for bug #148435 - SIV test assertion failure
define void @f(ptr %a) {
; CHECK-LABEL: 'f'
; CHECK-NEXT: Src: store i8 42, ptr %idx, align 1 --> Dst: store i8 42, ptr %idx, align 1
; CHECK-NEXT: da analyze - output [* *]!
;
entry:
br label %loop.i.header
loop.i.header:
%i = phi i64 [ 0, %entry ], [ %i.next, %loop.i.latch ]
%and.i = and i64 %i, 1
br label %loop.j
loop.j:
%j = phi i64 [ 0, %loop.i.header ], [ %j.next, %loop.j ]
%and.j = and i64 %j, 1
%idx = getelementptr [2 x [2 x i8]], ptr %a, i64 0, i64 %and.i, i64 %and.j
store i8 42, ptr %idx
%j.next = add i64 %j, 1
%exitcond.j = icmp eq i64 %j.next, 100
br i1 %exitcond.j, label %loop.i.latch, label %loop.j
loop.i.latch:
%i.next = add i64 %i, 1
%exitcond.i = icmp eq i64 %i.next, 100
br i1 %exitcond.i, label %exit, label %loop.i.header
exit:
ret void
}