[llvm] [SLP]Represent SLP graph as a tree (PR #126771)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 01:53:08 PST 2025
================
@@ -18178,11 +18343,9 @@ void BoUpSLP::computeMinimumValueSizes() {
// Ensure the roots of the vectorizable tree don't form a cycle.
if (VectorizableTree[NodeIdx]->isGather() ||
- (NodeIdx == 0 && !VectorizableTree[NodeIdx]->UserTreeIndices.empty()) ||
- (NodeIdx != 0 && any_of(VectorizableTree[NodeIdx]->UserTreeIndices,
- [NodeIdx](const EdgeInfo &EI) {
- return EI.UserTE->Idx > NodeIdx;
- })))
+ (NodeIdx == 0 && VectorizableTree[NodeIdx]->UserTreeIndex) ||
+ (NodeIdx != 0 &&
+ VectorizableTree[NodeIdx]->UserTreeIndex.UserTE->Idx > NodeIdx))
----------------
lukel97 wrote:
Can a cycle still occur now? Can this be made into an assert
https://github.com/llvm/llvm-project/pull/126771
More information about the llvm-commits
mailing list