[all-commits] [llvm/llvm-project] 3ec3fc: [CodeGen] In narrowExtractedVectorLoad bail out fo...

david-arm via All-commits all-commits at lists.llvm.org
Thu Aug 13 03:06:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ec3fcb97a6b5a42d89032d44d81bbe711d188a4
      https://github.com/llvm/llvm-project/commit/3ec3fcb97a6b5a42d89032d44d81bbe711d188a4
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-08-13 (Thu, 13 Aug 2020)

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

  Log Message:
  -----------
  [CodeGen] In narrowExtractedVectorLoad bail out for scalable vectors

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

Differential Revision: https://reviews.llvm.org/D83950




More information about the All-commits mailing list