llvm-6502/test/Transforms/LoopIndexSplit/2009-03-30-undef.ll
2009-09-08 22:34:10 +00:00

25 lines
540 B
LLVM

; RUN: opt < %s -loop-index-split -S | not grep undef
define i32 @main() {
entry:
br label %header
header:
%r = phi i32 [ 0, %entry ], [ %r3, %skip ]
%i = phi i32 [ 0, %entry ], [ %i1, %skip ]
%i99 = add i32 %i, 99
%cond = icmp eq i32 %i99, 3
br i1 %cond, label %body, label %skip
body:
br label %skip
skip:
%r3 = phi i32 [ %r, %header ], [ 3, %body ]
%i1 = add i32 %i, 1
%exitcond = icmp eq i32 %i1, 10
br i1 %exitcond, label %exit, label %header
exit:
ret i32 %r3
}