[PATCH] D83950: [CodeGen] In narrowExtractedVectorLoad bail out for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 07:05:25 PDT 2020


david-arm created this revision.
david-arm added reviewers: sdesmalen, ctetreau, c-rhodes.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.

In narrowExtractedVectorLoad there is an optimisation that tries to
combine extract_subvector with a narrowing vector load. At the moment
this produces warnings due to the incorrect calls to
getVectorNumElements() for scalable vector types. I've got this
working for scalable vectors too when the extract subvector index
is a multiple of the minimum number of elements. I have added a
new variant of the function:

  MachineFunction::getMachineMemOperand

that copies an existing MachineMemOperand, but replaces the pointer
info with a null version since we cannot currently represent scaled
offsets.

I've added a new test for this particular case in:

  CodeGen/AArch64/sve-extract-subvector.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83950

Files:
  llvm/include/llvm/CodeGen/MachineFunction.h
  llvm/lib/CodeGen/MachineFunction.cpp
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/sve-extract-subvector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83950.278464.patch
Type: text/x-patch
Size: 5593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/3dd7b22f/attachment.bin>


More information about the llvm-commits mailing list