[all-commits] [llvm/llvm-project] a44bdf: [DAG] visitINSERT_VECTOR_ELT - refactor BUILD_VECT...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Jul 16 08:38:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a44bdf9bc147af5c8e2b66764a1d33cce39a34b6
      https://github.com/llvm/llvm-project/commit/a44bdf9bc147af5c8e2b66764a1d33cce39a34b6
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-16 (Sat, 16 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

  Log Message:
  -----------
  [DAG] visitINSERT_VECTOR_ELT - refactor BUILD_VECTOR creation from INSERT_VECTOR_ELT chain.

D127595 added the ability to recurse up a (one-use) INSERT_VECTOR_ELT chain to create a BUILD_VECTOR before other combines manage to break the chain, something that is particularly bad in D127115.

The patch generalises this so it doesn't have to build the chain starting from the last element insertion, instead it can now start from any insertion and will recurse up the chain until it finds all elements or finds a UNDEF/BUILD_VECTOR/SCALAR_TO_VECTOR which represents that start of the chain.

Fixes several regressions in D127115




More information about the All-commits mailing list