[llvm] [LV] Allow for vectorizing parallel def-use chains (PR #225405)
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 03:34:35 PDT 2026
================
@@ -354,9 +354,16 @@ static RecurrenceDescriptor getMinMaxRecurrence(PHINode *Phi, Loop *TheLoop,
return !Chain.contains(U) && TheLoop->contains(U) &&
GetMinMaxRK(U, A, B) == RecurKind::None;
});
+
+ // If the backedge value has more than one use we should consider whether
+ // these are actually uses inside the loop.
+ bool BackedgeNumUsesInLoop = count_if(BackedgeValue->users(), [&](User *U) {
----------------
john-brawn-arm wrote:
This should be an integer type. Using a bool here means we optimize when there's at least one use in the loop, though this not causing any test failures implies we're also missing a test of there being more than one use in the loop.
https://github.com/llvm/llvm-project/pull/225405
More information about the llvm-commits
mailing list