[PATCH] D39003: [mips] Fix analyzeBranch to handle debug data

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 08:03:07 PDT 2017


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

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!


Repository:
  rL LLVM

https://reviews.llvm.org/D39003

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39003.119323.patch
Type: text/x-patch
Size: 5637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171017/441c1f26/attachment.bin>


More information about the llvm-commits mailing list