This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Support returned argument with multiple registers
ClosedPublic

Authored by nikic on Jan 21 2022, 1:40 AM.

Details

Summary

The call lowering code assumed that a returned argument could only consist of one register. Pass an ArrayRef<Register> instead of Register to make sure that all parts get assigned.

Not familiar with this code, so not sure whether this is the right approach -- I could imagine that the proper fix is to disable the returned handling for this case, rather than supporting it.

Fixes https://github.com/llvm/llvm-project/issues/53315.

Diff Detail

Event Timeline

nikic created this revision.Jan 21 2022, 1:40 AM
nikic requested review of this revision.Jan 21 2022, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2022, 1:40 AM
This comment was removed by 0x59616e.
This comment was removed by 0x59616e.

ok I was thinking in the wrong way. Sorry for the incorrect information.

arsenm accepted this revision.Jan 21 2022, 6:43 AM

LGTM. This should be done for fixing returned, but I think something is off here (at least for AArch64). isTypeIsValidForThisReturn claims this is only valid for 64-bit types, and I'm guessing the callbacks intent was to express the original type, not the legalized split type

This revision is now accepted and ready to land.Jan 21 2022, 6:43 AM
This revision was landed with ongoing or failed builds.Jan 24 2022, 1:58 AM
This revision was automatically updated to reflect the committed changes.