summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2023-03-12 18:22:41 -0700
committerTom Stellard <tstellar@redhat.com>2023-04-04 20:36:38 -0700
commitcd89023f797900e4492da58b7bed36f702120011 (patch)
tree52f420b06f73193999f15308df23d676b12ca67e
parentc57b104e95c12cc5984077940789a3c2c50510ae (diff)
downloadllvm-cd89023f797900e4492da58b7bed36f702120011.tar.gz
[SPARC] Attempt to fix bug introduced by D142458llvmorg-16.0.1
Reported https://lab.llvm.org/buildbot/#/builders/5/builds/32113 (cherry picked from commit ea4cbbbfa4207c30888acffc499c8fc71cd3d84f)
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrInfo.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}