[llvm] [SLP][NFC]Extract values state/operands analysis into separate class (PR #138724)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed May 7 11:07:58 PDT 2025


================
@@ -2896,11 +2885,17 @@ class BoUpSLP {
         // Since operand reordering is performed on groups of commutative
         // operations or alternating sequences (e.g., +, -), we can safely tell
         // the inverse operations by checking commutativity.
-        auto [SelectedOp, Ops] = convertTo(cast<Instruction>(VL[Lane]), S);
+        auto *I = dyn_cast<Instruction>(VL[Lane]);
+        if (!I && isa<PoisonValue>(VL[Lane])) {
----------------
alexey-bataev wrote:

Currently no, in future patches - yes

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


More information about the llvm-commits mailing list