]> granicus.if.org Git - llvm/commitdiff
[MBP] Remove an invalid assert.
authorXin Tong <trent.xin.tong@gmail.com>
Thu, 5 Oct 2017 23:00:04 +0000 (23:00 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Thu, 5 Oct 2017 23:00:04 +0000 (23:00 +0000)
The patch that this assert comes with is fixing a bug in MBP. The assert is
invalid however.

Thanks to @sergey.k.okunev for finding this

Currently this fails SPECCPU2006 LTO. I will add a test case when I do more
investigation and have one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315032 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBlockPlacement.cpp

index 12d8a9a0217a2c46b2cca20cc3d5604ed7a90fb5..c5991332f088b4e45dd6d37c6a28501ed4c7cae4 100644 (file)
@@ -2240,12 +2240,6 @@ void MachineBlockPlacement::buildLoopChains(const MachineLoop &L) {
   if (!RotateLoopWithProfile && LoopTop == L.getHeader())
     PreferredLoopExit = findBestLoopExit(L, LoopBlockSet);
 
-  // Make sure PreferredLoopExit actually exits the current loop.
-  if (PreferredLoopExit) {
-    assert(L.isLoopExiting(PreferredLoopExit) &&
-           "not an exiting block of current loop");
-  }
-
   BlockChain &LoopChain = *BlockToChain[LoopTop];
 
   // FIXME: This is a really lame way of walking the chains in the loop: we