This is an archive of the discontinued LLVM Phabricator instance.

[LoopSimplifyCFG] Fix corner case with duplicating successors
ClosedPublic

Authored by mkazantsev on Nov 23 2018, 3:09 AM.

Details

Summary

It fixes a bug that doesn't update Phi inputs of the only live successor that
is in the list of block's successors more than once.

Thanks @uabelho for finding this.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Nov 23 2018, 3:09 AM
mkazantsev edited the summary of this revision. (Show Details)Nov 23 2018, 3:12 AM

I've verifed that it solves the problem I reported. I've done a little bit of testing with the patch and didn't see anything obviously broken yet at least.

As for the details of the patch, I'm sure someone else knows better if this is the best way to solve the issue but it looks fine to me.

Thanks!

anna accepted this revision.Nov 26 2018, 1:45 PM

LGTM.

This revision is now accepted and ready to land.Nov 26 2018, 1:45 PM
This revision was automatically updated to reflect the committed changes.