This is an archive of the discontinued LLVM Phabricator instance.

[ModuloSchedule] Fix terminator update when peeling.
ClosedPublic

Authored by hgreving on May 25 2022, 8:22 AM.

Details

Summary

Fixes a bug of us not correctly updating the terminator of the loop's
preheader, if multiple terminating branch instructions are present.

This is tested through existing tests. The bug itself is hard or not
possible to get exposed with the upstream Hexagon backend, because
the machine pipeliner checks for an existing preheader, which is
defined as a block with only 1 edge into the header.

The condition of this bug is a block into the loop with more than 1
edge, and not every downstream target checks for an existing preheader.

Diff Detail

Event Timeline

hgreving created this revision.May 25 2022, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 8:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
hgreving requested review of this revision.May 25 2022, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 8:22 AM

There are a few lit failures, I will look at those first.

lkail added a subscriber: lkail.May 25 2022, 8:44 AM
hgreving updated this revision to Diff 432062.May 25 2022, 11:43 AM

Updates patch. Let's do it straight forward and support cases where no branch is needed to the fallthrough.

There are a few lit failures, I will look at those first.

Fixed.

hgreving edited the summary of this revision. (Show Details)May 25 2022, 2:13 PM

Added more reviewers with history of the modulo expansion code, since I believe there is no feasible test for upstream targets, see commit message.

jmolloy accepted this revision.Jun 6 2022, 7:27 AM
This revision is now accepted and ready to land.Jun 6 2022, 7:27 AM
ThomasRaoux accepted this revision.Jun 6 2022, 12:48 PM
This revision was landed with ongoing or failed builds.Jun 6 2022, 12:52 PM
This revision was automatically updated to reflect the committed changes.