This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Fix the determination of PostBB in conditional store merging to handle the targets on the second branch being commuted
ClosedPublic

Authored by craig.topper on Apr 20 2017, 4:23 PM.

Details

Summary

Currently we choose PostBB as the single successor of QFB, but its possible that QTB's single successor is QFB which would make QFB the correct choice.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Apr 20 2017, 4:23 PM
jmolloy accepted this revision.Apr 21 2017, 12:04 AM

LGTM, thanks! Looks like the rest of the code was written with this in mind, but I never got around to it.

James

This revision is now accepted and ready to land.Apr 21 2017, 12:04 AM
jmolloy added inline comments.Apr 21 2017, 12:05 AM
test/Transforms/SimplifyCFG/merge-cond-stores.ll
40 ↗(On Diff #96047)

Probably can remove this TODO now?

craig.topper added inline comments.Apr 21 2017, 9:03 AM
test/Transforms/SimplifyCFG/merge-cond-stores.ll
40 ↗(On Diff #96047)

Yeah. That was my intention when I put in the TODO but forgot. Thank!

This revision was automatically updated to reflect the committed changes.