[llvm] af2ae2c - [BranchRelaxation] Fix warning on unused variable. NFC.

Michael Liao via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 08:18:36 PDT 2021


Author: Michael Liao
Date: 2021-11-05T11:18:27-04:00
New Revision: af2ae2cf42a01c9a4f0cbe93196c276dc322ebf7

URL: https://github.com/llvm/llvm-project/commit/af2ae2cf42a01c9a4f0cbe93196c276dc322ebf7
DIFF: https://github.com/llvm/llvm-project/commit/af2ae2cf42a01c9a4f0cbe93196c276dc322ebf7.diff

LOG: [BranchRelaxation] Fix warning on unused variable. NFC.

Added: 
    

Modified: 
    llvm/lib/CodeGen/BranchRelaxation.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/BranchRelaxation.cpp b/llvm/lib/CodeGen/BranchRelaxation.cpp
index 28d336823df7..50825ccf9bac 100644
--- a/llvm/lib/CodeGen/BranchRelaxation.cpp
+++ b/llvm/lib/CodeGen/BranchRelaxation.cpp
@@ -485,7 +485,7 @@ bool BranchRelaxation::fixupUnconditionalBranch(MachineInstr &MI) {
     MachineBasicBlock *PrevBB = &*std::prev(DestBB->getIterator());
     if (auto *FT = PrevBB->getFallThrough()) {
       assert(FT == DestBB);
-      TII->insertUnconditionalBranch(*PrevBB, DestBB, DebugLoc());
+      TII->insertUnconditionalBranch(*PrevBB, FT, DebugLoc());
       // Recalculate the block size.
       BlockInfo[PrevBB->getNumber()].Size = computeBlockSize(*PrevBB);
     }


        


More information about the llvm-commits mailing list