This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] Handle promotion of shift with both operands the same
ClosedPublic

Authored by nikic on Jun 2 2022, 8:18 AM.

Details

Summary

When promoting a shift, make sure we only fetch the second operand after promoting the first. Load promotion may replace users of the old load, and we don't want to be left with a dangling reference to the old load instruction.

The crashing test case is from https://reviews.llvm.org/D126689#3553212.

Diff Detail

Event Timeline

nikic created this revision.Jun 2 2022, 8:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 8:18 AM
nikic requested review of this revision.Jun 2 2022, 8:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 8:18 AM
nikic retitled this revision from [DAGCombine] Handle promotion of shift by itself to [DAGCombine] Handle promotion of shift with both operands the same.Jun 2 2022, 8:19 AM
This revision is now accepted and ready to land.Jun 2 2022, 9:30 PM
This revision was landed with ongoing or failed builds.Jun 3 2022, 1:01 AM
This revision was automatically updated to reflect the committed changes.