[PATCH] D39288: [mips] Fix PR35071

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 07:10:15 PDT 2017


sdardis created this revision.
Herald added a subscriber: arichardson.

PR35071 exposed the fact that MipsInstrInfo::removeBranch did not walk past
debug instructions when removing branches for the control flow optimizer, which
lead to duplicated conditional branches. If the true branch was a removable
block, only the terminating conditional branch wold have it's MBB operands
updated, leaving the first with a dangling MBB operand. The MIPS long branch
pass would then trigger an assertion when attempting to examine the dangling
MBB.

This resolves PR35071.

Thanks to Alex Richardson for reporting the issue!


Repository:
  rL LLVM

https://reviews.llvm.org/D39288

Files:
  lib/Target/Mips/MipsInstrInfo.cpp
  test/CodeGen/Mips/pr35071.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39288.120246.patch
Type: text/x-patch
Size: 4315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171025/f24cc739/attachment.bin>


More information about the llvm-commits mailing list