[all-commits] [llvm/llvm-project] 404ceb: [AArch64][NEON] Fold insert(zero, extract(X, 0), 0...

CarolineConcatto via All-commits all-commits at lists.llvm.org
Thu Sep 10 01:40:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 404ceba2628b7f925ce650b63e1ea90440927481
      https://github.com/llvm/llvm-project/commit/404ceba2628b7f925ce650b63e1ea90440927481
  Author: CarolineConcatto <caroline.concatto at arm.com>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/neon-implicit-zero-filling.ll

  Log Message:
  -----------
  [AArch64][NEON] Fold insert(zero, extract(X, 0), 0) -> X when X is known to zero lanes 1-N (#213940)

Add patterns for NEON across-lane reductions whose scalar result
is inserted into lane zero of a zero vector.

This is valid because these instructions place their result in lane zero
and
clear the remaining lanes.

Limit this change to matching input and result vector types. Mixed
vector
sizes and scalar conversions are not part of this PR.

Handle llvm.vector.reduce.add.v2i64 separately because it lowers to
ADDP.
NEON has no equivalent instruction for v2i64 signed or unsigned min/max
reductions, so they cannot use this fold. Double-precision
floating-point
reductions are already handled by pairwise instruction patterns.



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