[all-commits] [llvm/llvm-project] 46ff6b: [SLP]Model or-reduction of masked shifted lanes as...
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Thu Sep 17 06:36:32 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 46ff6b5f0eaef577b03ac6aae8f9e8ffbcf632ab
https://github.com/llvm/llvm-project/commit/46ff6b5f0eaef577b03ac6aae8f9e8ffbcf632ab
Author: Alexey Bataev <a.bataev at outlook.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCostAnalysis.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCostAnalysis.h
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.h
M llvm/test/Transforms/PhaseOrdering/X86/avg.ll
M llvm/test/Transforms/SLPVectorizer/X86/bad-reduction.ll
M llvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
M llvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
M llvm/test/Transforms/SLPVectorizer/X86/pr48879-sroa.ll
M llvm/test/Transforms/SLPVectorizer/X86/reduce-or-bitpack.ll
M llvm/test/Transforms/SLPVectorizer/non-power-of-2-bswap.ll
Log Message:
-----------
[SLP]Model or-reduction of masked shifted lanes as a bitfield pack
An or reduction of and(shl(x, s), m) lanes that each cover a disjoint
contiguous byte field of the result is a repacking of the per-lane field
contents, not a shift and reduce. Prove the fields disjoint from the
per-lane possibly-set bits (a saturating numeric upper bound combined with
known bits), then emit the pack as a trunc, an optional per-lane lshr, a
byte shuffle and a bitcast. A plain byte reversal becomes a bswap, an
identity byte order needs no shuffle, and byte-zext lanes compact for free.
Fixes #175446
Assisted-by: Cursor
Reviewers: bababuck
Pull Request: https://github.com/llvm/llvm-project/pull/219731
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