[PATCH] D53756: [Mips] Conditionally remove successor block
Stefan Maksimovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 03:13:08 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345821: [Mips] Conditionally remove successor block (authored by smaksimovic, committed by ).
Herald added a subscriber: jrtc27.
Changed prior to commit:
https://reviews.llvm.org/D53756?vs=171288&id=172103#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53756
Files:
llvm/trunk/lib/Target/Mips/MipsBranchExpansion.cpp
llvm/trunk/test/CodeGen/Mips/micromips-mtc-mfc.ll
Index: llvm/trunk/test/CodeGen/Mips/micromips-mtc-mfc.ll
===================================================================
--- llvm/trunk/test/CodeGen/Mips/micromips-mtc-mfc.ll
+++ llvm/trunk/test/CodeGen/Mips/micromips-mtc-mfc.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -mtriple=mips -mcpu=mips32r2 -mattr=+micromips \
+; RUN: llc -mtriple=mips -mcpu=mips32r2 -mattr=+micromips -verify-machineinstrs \
; RUN: -show-mc-encoding < %s | FileCheck --check-prefix=MM2 %s
-; RUN: llc -mtriple=mips -mcpu=mips32r6 -mattr=+micromips \
+; RUN: llc -mtriple=mips -mcpu=mips32r6 -mattr=+micromips -verify-machineinstrs \
; RUN: -show-mc-encoding < %s | FileCheck --check-prefix=MM6 %s
define double @foo(double %a, double %b) {
Index: llvm/trunk/lib/Target/Mips/MipsBranchExpansion.cpp
===================================================================
--- llvm/trunk/lib/Target/Mips/MipsBranchExpansion.cpp
+++ llvm/trunk/lib/Target/Mips/MipsBranchExpansion.cpp
@@ -271,7 +271,8 @@
// Insert NewMBB and fix control flow.
MachineBasicBlock *Tgt = getTargetMBB(*FirstBr);
NewMBB->transferSuccessors(MBB);
- NewMBB->removeSuccessor(Tgt, true);
+ if (Tgt != getTargetMBB(*LastBr))
+ NewMBB->removeSuccessor(Tgt, true);
MBB->addSuccessor(NewMBB);
MBB->addSuccessor(Tgt);
MFp->insert(std::next(MachineFunction::iterator(MBB)), NewMBB);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53756.172103.patch
Type: text/x-patch
Size: 1427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/ab4f1f0b/attachment.bin>
More information about the llvm-commits
mailing list