Possible patch for PR21903 (MBB exits via unconditional fall-through but its successor differs from its CFG successor) ?

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 16:28:10 PST 2015


Hi,

As proposed in https://llvm.org/bugs/show_bug.cgi?id=21903, here is a patch to fix the "Bad machine code: MBB exits via unconditional fall-through but its successor differs from its CFG successor" errors encountered with a test case reduced from Inkscape.

As remarked by Jevin, the error happens when BranchFolding's SplitMBBAt eventually calls RegisterScavanger's forward(). RegisterScavenger seems to duplicate some of MachineVerify's dead register checking.  By not considering unallocatable registers (like FPSW) to be "dead", the IR successfully lowered.  Is this correct?

-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-pr21903-1.diff
Type: application/octet-stream
Size: 2066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/4006c764/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/4006c764/attachment.sig>


More information about the llvm-commits mailing list