This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] IR translate support for a return instruction of type <1 x i8> or <1 x i16> when using GlobalISel.
ClosedPublic

Authored by niwinanto on Jun 19 2023, 11:24 AM.

Details

Summary

Code generation for return instruction of type <1 x i8> or <1 x i16> when using GlobalISel causes internal compiler crash Could not handle ret ty.

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

Diff Detail

Event Timeline

niwinanto created this revision.Jun 19 2023, 11:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 11:24 AM
niwinanto requested review of this revision.Jun 19 2023, 11:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 11:24 AM
arsenm added inline comments.Jun 19 2023, 12:17 PM
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
417–418

This whole function is bad and I'd prefer to stop making the situation worse. Can you try switching to the helpers in MachineIRBuilder? e.g. buildPadVectorWithUndefElements

arsenm added inline comments.Jun 19 2023, 12:19 PM
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
406–416

Actually I think we have the same ugly code in the generic call lowering. I think at one point I was trying to delete this, maybe you'll have better luck now

niwinanto updated this revision to Diff 532747.Jun 19 2023, 1:31 PM

Feedback addressed.

niwinanto marked an inline comment as done.Jun 19 2023, 1:33 PM
niwinanto added inline comments.
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
417–418

Thank you for this suggestion, there is already buildPadVectorWithUndefElements I did update it to accept scalar type.

clang-format

aemerson accepted this revision.Jun 23 2023, 1:35 PM

LGTM.

This revision is now accepted and ready to land.Jun 23 2023, 1:35 PM

LGTM.

Thank you for reviewing. I do not have the commit access, could you please commit for me.
Niwin Anto <niwin.anto@hightec-rt.com>