[llvm] r315032 - [MBP] Remove an invalid assert.

Xin Tong via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 16:00:04 PDT 2017


Author: trentxintong
Date: Thu Oct  5 16:00:04 2017
New Revision: 315032

URL: http://llvm.org/viewvc/llvm-project?rev=315032&view=rev
Log:
[MBP] Remove an invalid assert.

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.

Modified:
    llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp

Modified: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp?rev=315032&r1=315031&r2=315032&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp Thu Oct  5 16:00:04 2017
@@ -2240,12 +2240,6 @@ void MachineBlockPlacement::buildLoopCha
   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




More information about the llvm-commits mailing list