[PR25538]: Fix a failure caused by r253126.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Mon, 16 Nov 2015 21:17:26 +0000 (21:17 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Mon, 16 Nov 2015 21:17:26 +0000 (21:17 +0000)
commitb13e139754e5088148dd7068122965936c33a9ba
tree4dcdca092ef7dd905f4354f929d3211ee1360d36
parent1a4e019fc0dec593268af08eeede197f10fcd727
[PR25538]: Fix a failure caused by r253126.

In r253126 we stopped to recompute LCSSA after loop unrolling in all
cases, except the unrolling is full and at least one of the loop exits
is outside the parent loop. In other cases the transformation should not
break LCSSA, but it turned out, that we also call SimplifyLoop on the
parent loop, which might break LCSSA by itself. This fix just triggers
LCSSA recomputation in this case as well.

I'm committing it without a test case for now, but I'll try to invent
one. It's a bit tricky because in an isolated test LoopSimplify would
be scheduled before LoopUnroll, and thus will change the test and hide
the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnroll.cpp