This is an archive of the discontinued LLVM Phabricator instance.

[GISel] Fix unmerging of constants for big endian target
AcceptedPublic

Authored by Kai on Jun 10 2022, 4:16 PM.

Details

Summary

Currently, unmerging of constants is always done in little endian style,
which is wrong for big endian targets. This change fixes this.

I need some advice how to test this, as no in-tree big endian target uses
G_UNMERGE_VALUES. I discovered this in my m88k backend.

Diff Detail

Event Timeline

Kai created this revision.Jun 10 2022, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 4:16 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
Kai requested review of this revision.Jun 10 2022, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 4:16 PM

Shouldn't M68K need and be testable with this?

Could you upload with more context (-U9999).

AArch64 supports big endian, so if you're testing individual passes you can specify a big endian target. (If you try to run a full IR compile it'll fall back to SDAG in the translator).

Reverse ping

arsenm accepted this revision.Nov 16 2022, 3:32 PM

LGTM, but an m68k test would be nice

This revision is now accepted and ready to land.Nov 16 2022, 3:32 PM