[llvm-branch-commits] [llvm] cd89023 - [SPARC] Attempt to fix bug introduced by D142458

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 4 20:38:48 PDT 2023


Author: Vitaly Buka
Date: 2023-04-04T20:36:38-07:00
New Revision: cd89023f797900e4492da58b7bed36f702120011

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

LOG: [SPARC]  Attempt to fix bug introduced by D142458

Reported https://lab.llvm.org/buildbot/#/builders/5/builds/32113

(cherry picked from commit ea4cbbbfa4207c30888acffc499c8fc71cd3d84f)

Added: 
    

Modified: 
    llvm/lib/Target/Sparc/SparcInstrInfo.cpp

Removed: 
    


################################################################################
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;
   }


        


More information about the llvm-branch-commits mailing list