Skip to content

Extend getMaxbits to handle Block type #7590

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 14 commits into from
Jun 3, 2025
Prev Previous commit
Next Next commit
In getMaxBits, the block type should be concrete
  • Loading branch information
xuruiyang2002 committed May 14, 2025
commit 82739183d4c190734ef0c2baa2231b05e6e81542
2 changes: 1 addition & 1 deletion src/ir/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ Index getMaxBits(Expression* curr,
} else if (auto* block = curr->dynCast<Block>()) {
// TODO: getFallthrough(block, ..., ...) is needed,
// because the localset also need it
if (!block->name.is() && block->list.size() > 0) {
if (!block->name.is() && block->list.size() > 0 && block->type.isConcrete()) {
return getMaxBits(block->list.back(), localInfoProvider);
}
}
Expand Down
Loading