[llvm] [LV] Support conditional scalar assignments of masked operations (PR #178862)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 3 03:14:43 PST 2026
================
@@ -264,6 +264,23 @@ static bool isMinMaxReductionPhiWithUsersOutsideReductionChain(
return true;
}
+// This matches a phi that selects between the original value (HeaderPhi) and an
+// arbitrary non-reduction value.
+static bool isFindLastLikePhi(PHINode *Phi, PHINode *HeaderPhi,
+ SmallPtrSetImpl<Instruction *> &ReductionInstrs) {
+ unsigned NumNonReduxInputs = 0;
+ for (const Use &Use : Phi->operands()) {
----------------
sdesmalen-arm wrote:
nit:
```suggestion
for (const Value *Op : Phi->operands()) {
```
(then you can also remove the `.get()` below)
https://github.com/llvm/llvm-project/pull/178862
More information about the llvm-commits
mailing list