From ea4cbbbfa4207c30888acffc499c8fc71cd3d84f Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sun, 12 Mar 2023 18:22:41 -0700 Subject: [PATCH] [SPARC] Attempt to fix bug introduced by D142458 Reported https://lab.llvm.org/buildbot/#/builders/5/builds/32113 --- llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp index cccce42d0438..a3a09a36f1dd 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp @@ -354,8 +354,8 @@ unsigned SparcInstrInfo::removeBranch(MachineBasicBlock &MBB, !isUncondBranchOpcode(I->getOpcode())) break; // Not a branch - I->eraseFromParent(); Removed += getInstSizeInBytes(*I); + I->eraseFromParent(); I = MBB.end(); ++Count; }