[all-commits] [llvm/llvm-project] 455ed5: [SVE][CodeGen] Legalisation of INSERT_VECTOR_ELT f...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Tue Aug 11 04:58:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 455ed56d48e365f7d095254109abed876dc10c65
      https://github.com/llvm/llvm-project/commit/455ed56d48e365f7d095254109abed876dc10c65
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2020-08-11 (Tue, 11 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    A llvm/test/CodeGen/AArch64/sve-split-insert-elt.ll

  Log Message:
  -----------
  [SVE][CodeGen] Legalisation of INSERT_VECTOR_ELT for scalable vectors

When the result type of insertelement needs to be split,
SplitVecRes_INSERT_VECTOR_ELT will try to store the vector to a
stack temporary, store the element at the location of the stack
temporary plus the index, and reload the Lo/Hi parts.

This patch does the following to ensure this works for scalable vectors:
 - Sets the StackID with getStackIDForScalableVectors() in CreateStackTemporary
 - Adds an IsScalable flag to getMemBasePlusOffset() and scales the
    offset by VScale when this is true
 - Ensures the immediate is clamped correctly by clampDynamicVectorIndex
    so that we don't try to use an out of range index

Reviewed By: david-arm

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




More information about the All-commits mailing list