[all-commits] [llvm/llvm-project] fd7169: [DAGCombine] Fold Splat(bitcast(buildvector(x, ..))...

David Green via All-commits all-commits at lists.llvm.org
Mon Dec 12 00:35:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd716925eca2a65c79a4375fb46151816afc1809
      https://github.com/llvm/llvm-project/commit/fd716925eca2a65c79a4375fb46151816afc1809
  Author: David Green <david.green at arm.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/arm64-dup.ll
    M llvm/test/CodeGen/AArch64/arm64-neon-3vdiff.ll
    M llvm/test/CodeGen/Thumb2/mve-vdup.ll
    M llvm/test/CodeGen/WebAssembly/simd-shuffle-bitcast.ll
    M llvm/test/CodeGen/X86/vector-shuffle-mmx.ll

  Log Message:
  -----------
  [DAGCombine] Fold Splat(bitcast(buildvector(x,..))) to splat(x)

This adds a fold which teaches the backend to fold
splat(bitcast(buildvector(x,..))) or
splat(bitcast(scalar_to_vector(x))) to a single splat.

This only handles lane 0 splats, which are only valid under LE, and
needs to be a little careful with the types it creates for the new
buildvector.

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




More information about the All-commits mailing list