[llvm] [SLP]Model copyable lanes of idempotent binops as op(V, V) when the operand column has a constant lane (PR #220252)

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 19:53:41 PDT 2026


================
@@ -11688,9 +11753,11 @@ class InstructionsCompatibilityAnalysis {
           isCommutative(MainOp) && NumMainOpOperands == 2;
       Operands.assign(NumMainOpOperands,
                       BoUpSLP::ValueList(VL.size(), nullptr));
+      SmallVector<const Value *> SelfOpLanes = findSelfOpLanes(S, VL, R);
----------------
bababuck wrote:

I think we only use the return value from this function in as `is_contained` call so a set would be better here.
```suggestion
      SmallPtrSet<const Value *> SelfOpLanes = findSelfOpLanes(S, VL, R);
```

https://github.com/llvm/llvm-project/pull/220252


More information about the llvm-commits mailing list