This is an archive of the discontinued LLVM Phabricator instance.

[IfConversion] Add missing check in IfConversion/canFallThroughTo
ClosedPublic

Authored by uabelho on May 9 2017, 5:09 AM.

Details

Summary

When trying to figure out if MBB could fallthrough to ToMBB (possibly by
falling through a bunch of other MBBs) we didn't actually check if there
was fallthrough between the last two blocks in the chain.

Diff Detail

Event Timeline

uabelho created this revision.May 9 2017, 5:09 AM

Not sure who is code owner of IfConversion.cpp so I added the last three persons who changed
anything there as reviwers.

kparzysz accepted this revision.May 9 2017, 10:42 AM

LGTM with a simplified testcase.

test/CodeGen/MIR/ARM/ifcvt_canFallThroughTo.mir
4

You can remove this entire section (with the LLVM IR).

31

You can remove lines 30-50.

This revision is now accepted and ready to land.May 9 2017, 10:42 AM
MatzeB added inline comments.May 9 2017, 11:07 AM
test/CodeGen/MIR/ARM/ifcvt_canFallThroughTo.mir
4
iteratee accepted this revision.May 9 2017, 11:13 AM

Looks good to me with the changes mentioned.

uabelho updated this revision to Diff 98417.May 10 2017, 2:48 AM

Simplified the testcase

Thanks for the comments! I didn't know you could omit this much from the mir file so I learned something today :) I suppose I can submit this now then?

uabelho marked 3 inline comments as done.May 10 2017, 2:50 AM

Thanks for the comments! I didn't know you could omit this much from the mir file so I learned something today :) I suppose I can submit this now then?

Yes, go ahead.

This revision was automatically updated to reflect the committed changes.