[llvm] [SLP]Remove emission of vector_insert/vector_extract intrinsics (PR #148007)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 07:18:28 PDT 2025


================
@@ -16296,6 +16288,27 @@ Value *BoUpSLP::gather(
           if (auto *SI = dyn_cast<Instruction>(Scalar))
             UserOp = SI;
         } else {
+          if (V->getType()->isVectorTy()) {
+            if (auto *SV = dyn_cast<ShuffleVectorInst>(InsElt);
+                SV && SV->getOperand(0) != V && SV->getOperand(1) != V) {
+              // Find shufflevector, caused by resize.
+              auto FindOperand = [&](Value *Vec, Value *V) -> Instruction * {
----------------
RKSimon wrote:

Can you remove the `&` capture?

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


More information about the llvm-commits mailing list