Skip to content

Fix pipeline-invalid.mlir bytecode roundtrip test #82366

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
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
7 changes: 5 additions & 2 deletions mlir/lib/Bytecode/Reader/BytecodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2334,8 +2334,11 @@ BytecodeReader::Impl::parseOpWithoutRegions(EncodingReader &reader,
Operation *op = Operation::create(opState);
readState.curBlock->push_back(op);

// If the operation had results, update the value references.
if (op->getNumResults() && failed(defineValues(reader, op->getResults())))
// If the operation had results, update the value references. We don't need to
// do this if the current value scope is empty. That is, the op was not
// encoded within a parent region.
if (readState.numValues && op->getNumResults() &&
failed(defineValues(reader, op->getResults())))
return failure();

/// Store a map for every value that received a custom use-list order from the
Expand Down