[PATCH] D18712: [LoopUnroll] Fix the way we update DT after complete unrolling.
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 16:45:38 PDT 2016
sanjoy added a comment.
Hi Michael,
How about loops like these:
define void @f() {
entry:
br label %loop.header
loop.header:
%iv = phi i32 [ 0, %entry ], [ %iv.inc, %latch ]
%iv.inc = add i32 %iv, 1
br i1 undef, label %diamond, label %latch
diamond:
br i1 undef, label %left, label %right
left:
br i1 undef, label %exit, label %merge
right:
br i1 undef, label %exit, label %merge
merge:
br label %latch
latch:
%end.cond = icmp eq i32 %iv, 1
br i1 %end.cond, label %exit1, label %loop.header
exit:
ret void
exit1:
ret void
}
?
`exit` is dominated by `diamond` (not a loop exit), but after unrolling `exit` becomes dominated by `loop.header`.
http://reviews.llvm.org/D18712
More information about the llvm-commits
mailing list