This is an archive of the discontinued LLVM Phabricator instance.

TailDuplicator: Fix tail duplicator to insert a branch when fallthrough is present.
Needs ReviewPublic

Authored by verena on May 28 2018, 3:54 AM.

Details

Reviewers
MatzeB
iteratee
Summary

If a block with an implicit fallthrough is duplicated into another, we need to insert an explicit branch, since the target block could be anywhere in the function. Also remove a duplicated call to removeBranch.

Unfortunately, I work on a proprietary target, so cannot provide a test case.

Diff Detail

Event Timeline

verena created this revision.May 28 2018, 3:54 AM
verena updated this revision to Diff 166093.Sep 19 2018, 4:42 AM

I noticed this fix is needed in another place in this method as well.