[llvm] [SLP]Better support for copyable values in stores (PR #153213)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 02:50:20 PDT 2025


================
@@ -26270,15 +26276,24 @@ bool SLPVectorizerPass::vectorizeStoreChains(BoUpSLP &R) {
     if (isa<UndefValue>(V1->getValueOperand()) ||
         isa<UndefValue>(V2->getValueOperand()))
       return true;
-    if (auto *I1 = dyn_cast<Instruction>(V1->getValueOperand()))
-      if (auto *I2 = dyn_cast<Instruction>(V2->getValueOperand())) {
-        if (I1->getParent() != I2->getParent())
-          return false;
-        return getSameOpcode({I1, I2}, *TLI).valid();
-      }
     if (isa<Constant>(V1->getValueOperand()) &&
         isa<Constant>(V2->getValueOperand()))
       return true;
+    auto *I1 = dyn_cast<Instruction>(V1->getValueOperand());
----------------
RKSimon wrote:

Please can you add a comment describing this

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


More information about the llvm-commits mailing list