This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix analyzeBranch to handle debug data
ClosedPublic

Authored by sdardis on Oct 17 2017, 8:03 AM.

Details

Summary

In the case where there was a conditional branch followed by a unconditional
branch with debug instruction separating them, MipsInstrInfo::analyzeBranch
would not skip past debug instruction when searching for the second branch
which give erroneous results about the control flow of the block.

This could lead to the branch folder to merge the non-fall through case
into it's predecessor, leaving the conditional branch with a dangling
basic block operand.

This resolves PR34975.

Thanks to Alexander Richardson for reporting the issue!

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis created this revision.Oct 17 2017, 8:03 AM

With this patch applied I can successfully compile the source file that was crashing. Thanks!

This revision is now accepted and ready to land.Oct 18 2017, 6:14 AM
This revision was automatically updated to reflect the committed changes.