[all-commits] [llvm/llvm-project] f22a17: Reland "[LV] Support conditional scalar assignment...
Benjamin Maxwell via All-commits
all-commits at lists.llvm.org
Tue Feb 10 01:58:11 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f22a178b132d42a22c5d1a9402641723a655cff3
https://github.com/llvm/llvm-project/commit/f22a178b132d42a22c5d1a9402641723a655cff3
Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: 2026-02-10 (Tue, 10 Feb 2026)
Changed paths:
M llvm/lib/Analysis/IVDescriptors.cpp
M llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
M llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
M llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
M llvm/test/Transforms/LoopVectorize/conditional-scalar-assignment-vplan.ll
M llvm/unittests/Analysis/IVDescriptorsTest.cpp
Log Message:
-----------
Reland "[LV] Support conditional scalar assignments of masked operations" (#180708)
This patch extends the support added in #158088 to loops where the
assignment is non-speculatable (e.g. a conditional load or divide).
For example, the following loop can now be vectorized:
```
int simple_csa_int_load(
int* a, int* b, int default_val, int N, int threshold)
{
int result = default_val;
for (int i = 0; i < N; ++i)
if (a[i] > threshold)
result = b[i];
return result;
}
```
It does this by extending the recurrence matching from only looking for
selects, to include phis where all operands are the header phi, except
for one which can be an arbitrary value outside the recurrence.
---
Reverts llvm/llvm-project#180275 (original PR: #178862)
Additional type legalization for `ISD::VECTOR_FIND_LAST_ACTIVE` was
added in #180290, which should resolve the backend crashes on x86.
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