[llvm] Support CSA for floating-point & pointer types (PR #182313)
Damian Heaton via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 06:27:53 PST 2026
================
@@ -1111,7 +1111,7 @@ class TargetTransformInfoImplBase {
virtual bool isLegalToVectorizeReduction(const RecurrenceDescriptor &RdxDesc,
ElementCount VF) const {
- return true;
+ return RdxDesc.getRecurrenceKind() != RecurKind::FFindLast;
----------------
dheaton-arm wrote:
I found that other targets weren't vectorizing these reductions, such that `[|iv]-select-cmp.ll` was falling back to scalar code rather than vector code if a `FFindLast` (or `FindLast` with floating point permitted) reduction plan was created. The purpose of this and the [if statement](https://github.com/llvm/llvm-project/pull/182313#discussion_r2829157691) was to avoid such a regression, by ensuring that we only allow a `FFindLast` reduction on targets which support vectorizing it.
https://github.com/llvm/llvm-project/pull/182313
More information about the llvm-commits
mailing list