From: Matt Arsenault Date: Fri, 7 Jun 2019 13:33:34 +0000 (+0000) Subject: TailDuplicator: Remove no-op analyzeBranch call X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49f4b27adf7e74ec550bae0975a59c647fd19a82;p=llvm 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362800 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/TailDuplicator.cpp b/lib/CodeGen/TailDuplicator.cpp index 15cbff4fbcf..4d3e02e3174 100644 --- a/lib/CodeGen/TailDuplicator.cpp +++ b/lib/CodeGen/TailDuplicator.cpp @@ -856,11 +856,6 @@ bool TailDuplicator::tailDuplicate(bool IsSimple, MachineBasicBlock *TailBB, } appendCopies(PredBB, CopyInfos, Copies); - // Simplify - MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr; - SmallVector PredCond; - TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond); - NumTailDupAdded += TailBB->size() - 1; // subtract one for removed branch // Update the CFG.