[all-commits] [llvm/llvm-project] 248567: [DAGCombiner] Try to partition ISD::EXTRACT_VECTOR...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Thu Dec 29 14:27:20 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 248567a3271961dd5b739890a6bdea22b3829490
      https://github.com/llvm/llvm-project/commit/248567a3271961dd5b739890a6bdea22b3829490
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-30 (Fri, 30 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/clear_upper_vector_element_bits.ll
    M llvm/test/CodeGen/X86/zero_extend_vector_inreg.ll

  Log Message:
  -----------
  [DAGCombiner] Try to partition ISD::EXTRACT_VECTOR_ELT to accomodate it's ISD::BUILD_VECTOR users

This mainly cleans up a few patterns that are legalized by scalarization
from a wide-element vector, but then are further split apart to build
a more narrow-sized-element vector. In particular this happens in some
cases for illegal ISD::ZERO_EXTEND_VECTOR_INREG.

Given a ISD::EXTRACT_VECTOR_ELT, which is a glorified bit sequence extract,
recursively analyse all of it's users. and try to model themselves as
bit sequence extractions. If all of them agree on the new, narrower element
type, and all of them can be modelled as ISD::EXTRACT_VECTOR_ELT's of that
new element type, do that, but only if unmodelled users are ISD::BUILD_VECTOR.




More information about the All-commits mailing list