This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add big endian support in CallLowering
ClosedPublic

Authored by 0x59616e on Jan 8 2022, 8:33 PM.

Details

Summary

When splitting values, CallLowering assumes Lo part goes first. But in big endian ISA such as M68k, Hi part goes first.

This patch fixes this.

Diff Detail

Event Timeline

0x59616e created this revision.Jan 8 2022, 8:33 PM
0x59616e requested review of this revision.Jan 8 2022, 8:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2022, 8:33 PM
0x59616e updated this revision to Diff 398403.Jan 9 2022, 1:22 AM

update diff

This comment was removed by 0x59616e.
arsenm added inline comments.Jan 10 2022, 11:33 AM
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
705–706

Can hoist the TLI query out of the loop

0x59616e updated this revision to Diff 398826.Jan 10 2022, 8:36 PM

update diff according to @arsenm suggestion

0x59616e marked an inline comment as done.Jan 10 2022, 8:36 PM
0x59616e added inline comments.
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
705–706

Done. Thanks :)

0x59616e marked an inline comment as done.Jan 10 2022, 8:48 PM
0x59616e updated this revision to Diff 399845.Jan 13 2022, 5:12 PM
0x59616e retitled this revision from [GlobalISel] Fix a big-endian-related bug in CallLowering to [GlobalISel] Add big endian support in CallLowering.

update diff.

Remove a test in this revision, since that test depends on the InstructionSelector of M68k and I defer that part.

arsenm accepted this revision.Jan 17 2022, 4:52 PM

LGTM

This revision is now accepted and ready to land.Jan 17 2022, 4:52 PM
0x59616e added a comment.EditedJan 18 2022, 4:11 AM

Thanks @arsenm for reviewing ! Really appreciate all the help you give ;)

RKSimon added a subscriber: RKSimon.Feb 8 2022, 3:13 AM

@0x59616e reverse ping - what's happening with this patch?

@0x59616e reverse ping - what's happening with this patch?

I think now it's ok to land this.
Could you help me ?

name: Sheng
email: ox59616e@gmail.com

This revision was landed with ongoing or failed builds.Feb 8 2022, 6:43 AM
This revision was automatically updated to reflect the committed changes.

Thanks ! Appreciate your help ;)