[llvm] [SLP]Initial compatibility support for shl v, 1 and add v, v (PR #181168)

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 19:25:17 PST 2026


================
@@ -4211,6 +4262,26 @@ class slpvectorizer::BoUpSLP {
       return CopyableElements.contains(V);
     }
 
+    /// Checks if the value \p V is a transformed instruction, compatible either
+    /// with main or alternate ops.
+    bool isExpandedBinOp(Value *V) const {
+      assert(hasState() && "InstructionsState is invalid.");
+      if (isCopyableElement(V))
+        return false;
----------------
bababuck wrote:

Nit: Maybe redundant since this is checked again at the start of `S.isExpandedBinOp()`

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


More information about the llvm-commits mailing list