This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Fix PR56251: Do not remove the reordering from the root node, being used as an operand.
ClosedPublic

Authored by ABataev on Jun 27 2022, 1:45 PM.

Details

Summary

If the root order itself does not required reordering, we can just
remove its reorder mask safely (e.g., if the root node is a vector of
phis). But if this node is used as an operand in the graph, we cannot
delete the reordering, need to keep it. Otherwise the graph nodes are
not synchronized with the operands. It may cause an extra gather
instruction(s) or a compiler crash.

Diff Detail

Event Timeline

ABataev created this revision.Jun 27 2022, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 1:45 PM
ABataev requested review of this revision.Jun 27 2022, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 1:45 PM

Thanks, I can verify that this fixes the crash I reported.

ABataev updated this revision to Diff 440576.Jun 28 2022, 5:36 AM

Added a fix for gathers reordering

reoder-phi-operand.ll -> reorder-phi-operand.ll

ABataev updated this revision to Diff 440595.Jun 28 2022, 6:38 AM

Address comment

scui added a subscriber: scui.Jun 28 2022, 12:39 PM

This also fixed the problem we found in our build. The code looks good. Thanks.

This also fixes the crashes in the chromium build, thanks!

Can you accept the patch?

akhuang accepted this revision.Jun 28 2022, 1:40 PM
This revision is now accepted and ready to land.Jun 28 2022, 1:40 PM
This revision was landed with ongoing or failed builds.Jun 28 2022, 1:46 PM
This revision was automatically updated to reflect the committed changes.