This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Import XRO load/store patterns instead of custom selection
ClosedPublic

Authored by paquette on Aug 23 2019, 12:50 PM.

Details

Summary

Instead of using custom C++ in earlySelect for loads and stores, just import the patterns.

Remove earlySelectLoad, since we can just import the work it's doing.

Some minor changes to how ComplexRendererFns are returned for the XRO addressing modes. If you add immediates in two steps, sometimes they are not imported properly and you only end up with one immediate. I'm not sure if this is intentional.

  • Update load-addressing-modes.mir to include the instructions we can now import.
  • Add a similar test, store-addressing-modes.mir to show which store opcodes we currently import, and show that we can pull in shifts etc.
  • Update arm64-fastisel-gep-promote-before-add.ll to use FastISel instead of GISel. This test failed with GISel because GISel folds the gep into the load. The test checks that FastISel doesn't fold non-pointer-width adds into loads. GISel on the other hand, produces a G_CONSTANT of -128 for the add, and then a G_GEP, which must be pointer-width.

Note that we don't get STRBRoX right now. It seems like the importer can't handle FPR8Op:{ *:[Untyped] }:$Rt source operands. So, those are not currently supported.

Diff Detail

Repository
rL LLVM

Event Timeline

paquette created this revision.Aug 23 2019, 12:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2019, 12:50 PM
aemerson accepted this revision.Aug 23 2019, 1:19 PM

Nice, LGTM.

This revision is now accepted and ready to land.Aug 23 2019, 1:19 PM
This revision was automatically updated to reflect the committed changes.