[llvm] [SLP] Check for extracts, being replaced by original scalars, for user nodes (PR #149572)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 08:20:34 PDT 2025


================
@@ -10700,6 +10801,15 @@ void BoUpSLP::buildTreeRec(ArrayRef<Value *> VLRef, unsigned Depth,
     return;
   }
 
+  // Postpone vectorization, if the node is not profitable because of the
+  // external uses.
----------------
alexey-bataev wrote:

We're estimating the cost of the keeping the scalar штыкгсешщт scalar because of the external uses, not because of the tree internal uses. Internal uses are always vectorized (well, almost, except for the vector pointers, being the addresses of the vectorized loads), so we don't need to check internal uses

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


More information about the llvm-commits mailing list