[all-commits] [llvm/llvm-project] 34dff4: [SLP]Flatten fsub/fneg chains into fadd reductions...
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Mon Sep 7 05:06:01 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 34dff487dd711a6a6d6a22f474ce475bce757b47
https://github.com/llvm/llvm-project/commit/34dff487dd711a6a6d6a22f474ce475bce757b47
Author: Alexey Bataev <a.bataev at outlook.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCompatibilityAnalysis.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCompatibilityAnalysis.h
M llvm/test/Transforms/SLPVectorizer/AArch64/loop-accumulator-reduction.ll
M llvm/test/Transforms/SLPVectorizer/AArch64/many-uses-fma-candidate.ll
M llvm/test/Transforms/SLPVectorizer/AMDGPU/reduction.ll
M llvm/test/Transforms/SLPVectorizer/X86/fma-operand-index.ll
M llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
M llvm/test/Transforms/SLPVectorizer/X86/horizontal-list.ll
M llvm/test/Transforms/SLPVectorizer/X86/loop-accumulator-reduction.ll
M llvm/test/Transforms/SLPVectorizer/X86/ordered-reduction-replaced.ll
M llvm/test/Transforms/SLPVectorizer/X86/reduction-fadd-reassoc.ll
Log Message:
-----------
[SLP]Flatten fsub/fneg chains into fadd reductions with per-operand signs
For unordered fadd reductions, reassociable (reassoc+nsz) fsub/fneg
chain links are recursed into and their leaves tracked with a flipped
sign, which is part of the grouping key, so reduced-values groups are
sign-uniform by construction. If per-value signs cannot model the
chain, the analysis restarts once without the flattening. Negated
parts are combined with vector fsub (may form per-lane fma) and
subtracted once in the final combine; no extra negations are emitted.
Fixes #211521
Reviewers: hiraditya, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/215840
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