[ShrinkWrapping] Fix an infinite loop while looking for restore point.
authorQuentin Colombet <qcolombet@apple.com>
Tue, 15 Sep 2015 18:19:39 +0000 (18:19 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 15 Sep 2015 18:19:39 +0000 (18:19 +0000)
commit07400eaee02cc4cf136c2513e9338f6db5712f96
tree70093efcd3a878d83940dd4461278b3efcf6af12
parent5332ea03d1a061e10977c3db77437ed0f99bfd3a
[ShrinkWrapping] Fix an infinite loop while looking for restore point.
This may happen when the input program itself contains an infinite loop with no
exit block. In that case, we would fail to find a block post-dominating the loop
such that this block is outside of the loop.

This fixes PR24823.
Working on reducing the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247710 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ShrinkWrap.cpp