Skip to content
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
6 changes: 1 addition & 5 deletions src/passes/RemoveUnusedBrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,7 @@ struct RemoveUnusedBrs : public WalkerPass<PostWalker<RemoveUnusedBrs>> {
// if this block has just one child, a sub-block, then jumps to the
// former are jumps to us, really
if (auto* child = list[0]->dynCast<Block>()) {
// the two blocks must have the same type for us to update the
// branch, as otherwise one block may be unreachable and the other
// concrete, so one might lack a value
if (child->name.is() && child->name != curr->name &&
child->type == curr->type) {
if (child->name.is()) {
redirectBranches(child, curr->name);
}
}
Expand Down
Loading