[PATCH] D58469: [GlobalISel][AArch64] Add selection support for G_EXTRACT_VECTOR_ELT with FPR dest

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 11:49:39 PST 2019


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

This adds support for G_EXTRACT_ELT in AArch64 when we have something like

  %1:fpr(s64) = G_EXTRACT_VECTOR_ELT %0(<2 x s64>), %3(s64)

This also only handles cases where the index is generated by a G_CONSTANT.

It also factors out the lane copy opcode selection part into its own function, `getLaneCopyOpcode` which is used by both `AArch64InstructionSelector::selectUnmergeValues` and `AArch64InstructionSelector::selectExtractElt`.

There's some more refactoring that can be done between those two functions, but for the purposes of keeping the patch somewhat small, I just stuck with that one part. (For example, the IMPLICIT_DEF/INSERT_SUBREG part is basically the same.)


https://reviews.llvm.org/D58469

Files:
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.cpp
  lib/Target/AArch64/AArch64RegisterBankInfo.cpp
  test/CodeGen/AArch64/GlobalISel/select-extract-vector-elt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58469.187639.patch
Type: text/x-patch
Size: 10897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190220/d6bfa840/attachment.bin>


More information about the llvm-commits mailing list