This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Return false from isOffsetFoldingLegal instead of reversing the fold in lowering.
ClosedPublic

Authored by craig.topper on May 27 2022, 10:20 AM.

Details

Summary

When lowering GlobalAddressNodes, we were removing a non-zero offset and
creating a separate ADD.

It already comes out of SelectionDAGBuilder with a separate ADD. The
ADD was being removed by DAGCombiner.

This patch disables the DAG combine so we don't have to reverse it.
Test changes all look to be instruction order changes. Probably due
to different DAG node ordering.

Diff Detail

Event Timeline

craig.topper created this revision.May 27 2022, 10:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 10:20 AM
craig.topper requested review of this revision.May 27 2022, 10:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2022, 10:20 AM
reames accepted this revision.May 27 2022, 11:02 AM

LGTM

This revision is now accepted and ready to land.May 27 2022, 11:02 AM
This revision was landed with ongoing or failed builds.May 27 2022, 11:05 AM
This revision was automatically updated to reflect the committed changes.
asb added a comment.May 27 2022, 11:45 AM

This introduced some compiler warnings for me, e.g. XlenVT no longer being used.