This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix PR35071
ClosedPublic

Authored by sdardis on Oct 25 2017, 7:10 AM.

Details

Summary

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 target of the branch was a
removable block, only the conditional branch in the terminating position would
have it's MBB operands updated, leaving the first branch with a dangling MBB
operand. The MIPS long branch pass would then trigger an assertion when
attempting to examine the instruction with dangling MBB operand.

This resolves PR35071.

Thanks to Alex Richardson for reporting the issue!

Event Timeline

sdardis created this revision.Oct 25 2017, 7:10 AM

Thanks for the quick fix! I can confirm that we can now build all of CheriBSD with clang again.

This revision is now accepted and ready to land.Oct 25 2017, 9:31 PM
sdardis edited the summary of this revision. (Show Details)Oct 26 2017, 3:56 AM
sdardis edited the summary of this revision. (Show Details)Oct 26 2017, 3:58 AM
This revision was automatically updated to reflect the committed changes.