Skip to content

Commit 07ba457

Browse files
committed
[SLP][NFC]Add dump of combined entries, where applicable
1 parent 9ab16d4 commit 07ba457

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3311,7 +3311,7 @@ class BoUpSLP {
33113311

33123312
/// For gather/buildvector/alt opcode (TODO) nodes, which are combined from
33133313
/// other nodes as a series of insertvector instructions.
3314-
SmallVector<std::pair<unsigned, unsigned>, 0> CombinedEntriesWithIndices;
3314+
SmallVector<std::pair<unsigned, unsigned>, 2> CombinedEntriesWithIndices;
33153315

33163316
private:
33173317
/// The operands of each instruction in each lane Operands[op_index][lane].
@@ -3545,6 +3545,13 @@ class BoUpSLP {
35453545
for (const auto &EInfo : UserTreeIndices)
35463546
dbgs() << EInfo << ", ";
35473547
dbgs() << "\n";
3548+
if (!CombinedEntriesWithIndices.empty()) {
3549+
dbgs() << "Combined entries: ";
3550+
interleaveComma(CombinedEntriesWithIndices, dbgs(), [&](const auto &P) {
3551+
dbgs() << "Entry index " << P.first << " with offset " << P.second;
3552+
});
3553+
dbgs() << "\n";
3554+
}
35483555
}
35493556
#endif
35503557
};

0 commit comments

Comments
 (0)