[llvm] [SLP] NFC. Replace MainOp and AltOp in TreeEntry with InstructionsState. (PR #120198)

Han-Kuan Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 06:48:03 PST 2025


================
@@ -3261,7 +3263,12 @@ class BoUpSLP {
     };
 
     /// Checks if the current node is a gather node.
-    bool isGather() const {return State == NeedToGather; }
+    bool isGather() const {
+      assert(
+          (State == NeedToGather || S.valid()) &&
+          "InstructionsState must be valid if the TreeEntry is not gathered.");
----------------
HanKuanChen wrote:

Got it. The check will be in other PR.

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


More information about the llvm-commits mailing list