[llvm] r362800 - TailDuplicator: Remove no-op analyzeBranch call

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 06:33:34 PDT 2019


Author: arsenm
Date: Fri Jun  7 06:33:34 2019
New Revision: 362800

URL: http://llvm.org/viewvc/llvm-project?rev=362800&view=rev
Log:
TailDuplicator: Remove no-op analyzeBranch call

This could fail, which looked concerning. However nothing was actually
using the results of this. I assume this was intended to use the
anti-feature of analyzeBranch of removing instructions, but wasn't
actually calling it with AllowModify = true.

Fixes bug 42162.

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

Modified: llvm/trunk/lib/CodeGen/TailDuplicator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplicator.cpp?rev=362800&r1=362799&r2=362800&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplicator.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplicator.cpp Fri Jun  7 06:33:34 2019
@@ -856,11 +856,6 @@ bool TailDuplicator::tailDuplicate(bool
     }
     appendCopies(PredBB, CopyInfos, Copies);
 
-    // Simplify
-    MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr;
-    SmallVector<MachineOperand, 4> PredCond;
-    TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond);
-
     NumTailDupAdded += TailBB->size() - 1; // subtract one for removed branch
 
     // Update the CFG.




More information about the llvm-commits mailing list