This is an archive of the discontinued LLVM Phabricator instance.

Make FoldBranchToCommonDest poison-safe by default
ClosedPublic

Authored by aqjune on Mar 27 2021, 1:51 AM.

Details

Summary

This is a small patch to make FoldBranchToCommonDest poison-safe by default.
After fc3f0c9c, only two syntactic changes are needed to fix unit tests.
This does not cause any assembly difference in testsuite as well (-O3, X86-64 Manjaro).

Diff Detail

Event Timeline

aqjune created this revision.Mar 27 2021, 1:51 AM
aqjune requested review of this revision.Mar 27 2021, 1:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2021, 1:51 AM
aqjune edited the summary of this revision. (Show Details)Mar 27 2021, 1:52 AM
nikic added inline comments.Mar 27 2021, 2:30 AM
llvm/test/Transforms/IRCE/bad_expander.ll
101

This looks a bit suspect to me. Shouldn't the impliesPoison turn this into an and, because true cannot be poison? Or does this only get folded to true lateron?

aqjune added inline comments.Mar 27 2021, 2:40 AM
llvm/test/Transforms/IRCE/bad_expander.ll
101

FoldBranchToCommonDest merges %maybe_exit and %rc, so select is created at the moment. %rc is folded to true later.

nikic accepted this revision.Mar 27 2021, 3:02 AM

LGTM

This revision is now accepted and ready to land.Mar 27 2021, 3:02 AM
aqjune edited the summary of this revision. (Show Details)Mar 27 2021, 3:04 AM
This revision was landed with ongoing or failed builds.Mar 27 2021, 3:05 AM
This revision was automatically updated to reflect the committed changes.