[PATCH] D132043: [AArch64][GISel] Lower llvm.prefetch

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 10:48:10 PDT 2022


lenary created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
lenary requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change adds support for lowering llvm.prefetch directly using
GlobalISel. Currently, llvm.prefetch falls back to SelectionDAG.

This Change:

- Adds an AArch64-specific G_PREFETCH generic instruction, to be used where AArch64ISD::PREFETCH is used in SelectionDAG.
- Adds the GINodeEquiv so patterns are translated over to GlobalISel automatically.
- Corrects the AArch64Prefetch patterns to use a target immediate, which is needed to get the patterns to translate across correctly.
- Translates the SelectionDAG legalisation of the prefetch intrinsic into the corresponding GlobalISel legalisation.

Depends on D132042 <https://reviews.llvm.org/D132042>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132043

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64InstrFormats.td
  llvm/lib/Target/AArch64/AArch64InstrGISel.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/arm64-prefetch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132043.453344.patch
Type: text/x-patch
Size: 5145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/935503c1/attachment.bin>


More information about the llvm-commits mailing list