This is an archive of the discontinued LLVM Phabricator instance.

IR: Fix use-list-order round-tripping for br
ClosedPublic

Authored by dexonsmith on Jun 25 2021, 4:42 PM.

Details

Summary

Fix the use-list-order for br instructions by setting the operands in
order of their index to match the use-list-order prediction. The case
where this matters is when there is a condition but the if-true and
if-false branches are identical.

Bug was found when reviewing failures pointed at by
https://reviews.llvm.org/D104950. Fix is similar to
3cf415c6c367ced43175ebd1dc4bd9582c7f5376.

Diff Detail

Event Timeline

dexonsmith created this revision.Jun 25 2021, 4:42 PM
dexonsmith requested review of this revision.Jun 25 2021, 4:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2021, 4:42 PM
nikic accepted this revision.Jun 26 2021, 12:51 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jun 26 2021, 12:51 AM
This revision was automatically updated to reflect the committed changes.