[llvm] [SLP] NFC. Use InstructionsState::valid if users just want to know whether VL has same opcode. (PR #120217)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 24 10:17:09 PST 2024


================
@@ -15059,7 +15061,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
   auto *VecTy = getWidenedType(ScalarTy, E->Scalars.size());
   if (E->isGather()) {
     // Set insert point for non-reduction initial nodes.
-    if (E->getMainOp() && E->Idx == 0 && !UserIgnoreList)
+    if (E->getMainOp() != nullptr && E->Idx == 0 && !UserIgnoreList)
----------------
alexey-bataev wrote:

Restore original code

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


More information about the llvm-commits mailing list