[all-commits] [llvm/llvm-project] cfe1b4: [DAGCombiner] Fold trunc(build_vector(ext(x), ext(...

Liao Chunyu via All-commits all-commits at lists.llvm.org
Sat Feb 14 18:02:08 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfe1b46b46e7470a5f4162bfeae2440fb99cfed6
      https://github.com/llvm/llvm-project/commit/cfe1b46b46e7470a5f4162bfeae2440fb99cfed6
  Author: Liao Chunyu <chunyu at iscas.ac.cn>
  Date:   2026-02-15 (Sun, 15 Feb 2026)

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

  Log Message:
  -----------
  [DAGCombiner] Fold trunc(build_vector(ext(x), ext(x)) -> build_vector(x,x) (#179857)

The original implementation performed the transformation when
isTruncateFree was true:
 truncate(build_vector(x, x)) -> build_vector(truncate(x), truncate(x)).
    
In some cases, x comes from an ext, try to pre-truncate build_vectors
source operands
 when the source operands of build_vectors comes from an ext.
    
 Testcase from: https://gcc.godbolt.org/z/bbxbYK7dh



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list