This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Overhaul G_EXTRACT legalization
ClosedPublic

Authored by paquette on Aug 4 2021, 3:05 PM.

Details

Summary

This simplifies our existing G_EXTRACT rules and adds some test coverage. Mostly changing this because it should make it easier to improve legalization for instructions which use G_EXTRACT as part of the legalization process.

This also adds support for legalizing some weird types. Similar to other recent legalizer changes, this changes the order of widening/clamping.

There was some dead code in our existing rules (e.g. the p0 case would never get hit), so this knocks those out and makes the types we want to handle explicit.

This also removes some checks which, nowadays, are handled by the MachineVerifier.

Diff Detail

Event Timeline

paquette created this revision.Aug 4 2021, 3:05 PM
paquette requested review of this revision.Aug 4 2021, 3:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2021, 3:05 PM

Some of the tests don't look like they have anything extract related in the output due to undef.

paquette updated this revision to Diff 364524.Aug 5 2021, 10:01 AM

Avoid using G_IMPLICIT_DEF in tests (aside from extremely weird cases like s3_from_s35)

aemerson accepted this revision.Aug 5 2021, 10:51 AM
This revision is now accepted and ready to land.Aug 5 2021, 10:51 AM
This revision was automatically updated to reflect the committed changes.