Page MenuHomePhabricator

[LoopUnswitch] Fix incorrect Modified status
ClosedPublic

Authored by dstenb on Aug 17 2020, 9:10 AM.

Details

Summary

When hoisting simple values out from a loop, and an optsize attribute, a
convergent call, or an invoke instruction hindered the pass from
unswitching the loop, the pass would return an incorrect Modified
status.

This was caught using the check introduced by D80916.

Diff Detail

Event Timeline

dstenb created this revision.Aug 17 2020, 9:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 9:10 AM
dstenb requested review of this revision.Aug 17 2020, 9:10 AM
asbirlea accepted this revision.Aug 17 2020, 9:17 AM

If you'd be able to add reproducers in follow up patch, that would be great.

This revision is now accepted and ready to land.Aug 17 2020, 9:17 AM
dstenb updated this revision to Diff 286308.Aug 18 2020, 9:16 AM
dstenb edited the summary of this revision. (Show Details)

Slight refactoring of the existing test case, and add test cases for the other two returns.

If you'd be able to add reproducers in follow up patch, that would be great.

It was easier to create reproducers than I initially thought, so I just added those two tests to this patch also. Does this look okay?

dstenb requested review of this revision.Aug 18 2020, 9:18 AM
asbirlea accepted this revision.Aug 19 2020, 2:18 PM

Great, thank you!

This revision is now accepted and ready to land.Aug 19 2020, 2:18 PM
This revision was automatically updated to reflect the committed changes.