[all-commits] [llvm/llvm-project] 058cd8: [CodeGen] Add support for inserting elements into ...

david-arm via All-commits all-commits at lists.llvm.org
Thu Apr 30 03:14:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 058cd8c5be1cb6c74c0cfc154a61ea859e1c8811
      https://github.com/llvm/llvm-project/commit/058cd8c5be1cb6c74c0cfc154a61ea859e1c8811
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
    A llvm/test/CodeGen/AArch64/sve-insert-element.ll

  Log Message:
  -----------
  [CodeGen] Add support for inserting elements into scalable vectors

Summary:
This patch tries to ensure that we do something sensible when
generating code for the ISD::INSERT_VECTOR_ELT DAG node when operating
on scalable vectors. Previously we always returned 'undef' when
inserting an element into an out-of-bounds lane index, whereas now
we only do this for fixed length vectors. For scalable vectors it
is assumed that the backend will do the right thing in the same way
that we have to deal with variable lane indices.

In this patch I have permitted a few basic combinations for scalable
vector types where it makes sense, but in general avoided most cases
for now as they currently require the use of BUILD_VECTOR nodes.

This patch includes tests for all scalable vector types when inserting
into lane 0, but I've only included one or two vector types for other
cases such as variable lane inserts.

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




More information about the All-commits mailing list