[all-commits] [llvm/llvm-project] 18f5ad: [DAGCombiner] Don't reduce BUILD_VECTOR to BITCAST...

Jim Lin via All-commits all-commits at lists.llvm.org
Fri Aug 18 21:54:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18f5ada24453491f33c0f23eb4eac08e84be72e6
      https://github.com/llvm/llvm-project/commit/18f5ada24453491f33c0f23eb4eac08e84be72e6
  Author: Jim Lin <jim at andestech.com>
  Date:   2023-08-19 (Sat, 19 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up.ll

  Log Message:
  -----------
  [DAGCombiner] Don't reduce BUILD_VECTOR to BITCAST before LegalizeTypes if VT is legal.

Targets may lose some optimization opportunities for certain vector operation
if we reduce BUILD_VECTOR to BITCAST early.

And if VT is not legal, reduce BUILD_VECTOR to BITCAST before LegailizeTypes
can get benefit. Because type-legalizer often scalarizes illegal type of vectors.

Reviewed By: sebastian-ne

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




More information about the All-commits mailing list