This is an archive of the discontinued LLVM Phabricator instance.

[LoopPeel] Clear dispositions after peeling
ClosedPublic

Authored by nikic on Jun 26 2023, 6:34 AM.

Details

Summary

Block dispositions of values defined inside the loop may change during peeling, so clear them. We already do this for other kind of unrolling.

Diff Detail

Event Timeline

nikic created this revision.Jun 26 2023, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 6:34 AM
nikic requested review of this revision.Jun 26 2023, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 6:34 AM

I've verified this fixes the problem I saw. Great!

llvm/test/Transforms/LoopUnroll/loop-block-disposition-after-loop-peeling.ll
3

Perhaps add -verify-scev since that's what caught the error? As far as I can see the actual ll output is identical with/without the fix so without -verify-scev I guess it only tests the fix in EXPENSIVE_CHECKS builds?

nikic updated this revision to Diff 534544.Jun 26 2023, 7:14 AM

Add -verify-scev.

llvm/test/Transforms/LoopUnroll/loop-block-disposition-after-loop-peeling.ll
3

Ooops, that was just an oversight on my part.

fhahn accepted this revision.Jul 19 2023, 1:34 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 19 2023, 1:34 AM
This revision was landed with ongoing or failed builds.Jul 19 2023, 1:40 AM
This revision was automatically updated to reflect the committed changes.