[PATCH] D66679: [AArch64][GlobalISel] Import XRO load/store patterns instead of custom selection

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 12:52:49 PDT 2019


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: Petar.Avramovic, jfb, hiraditya, kristof.beyls, javed.absar, rovka.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D66679

Files:
  llvm/lib/Target/AArch64/AArch64InstrFormats.td
  llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
  llvm/test/CodeGen/AArch64/GlobalISel/store-addressing-modes.mir
  llvm/test/CodeGen/AArch64/arm64-fastisel-gep-promote-before-add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66679.216931.patch
Type: text/x-patch
Size: 17511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190823/3dac2ca2/attachment.bin>


More information about the llvm-commits mailing list