Skip to content

[llvm] Fix crash when complex deinterleaving operates on an unrolled loop #129735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,17 @@ void ComplexDeinterleavingGraph::identifyReductionNodes() {
LLVM_DEBUG(
dbgs() << "Identified single reduction starting from instruction: "
<< *Real << "/" << *ReductionInfo[Real].second << "\n");

// Reducing to a single vector is not supported, only permit reducing down
// to scalar values.
// Doing this here will leave the prior node in the graph,
// however with no uses the node will be unreachable by the replacement
// process. That along with the usage outside the graph should prevent the
// replacement process from kicking off at all for this graph.
// TODO Add support for reducing to a single vector value
if (ReductionInfo[Real].second->getType()->isVectorTy())
continue;

Processed[i] = true;
auto RootNode = prepareCompositeNode(
ComplexDeinterleavingOperation::ReductionSingle, Real, nullptr);
Expand Down
Loading
Loading