Skip to content
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

Stronger chain detection in LoopCarry pass #8016

Merged
merged 10 commits into from
Jan 9, 2024
4 changes: 2 additions & 2 deletions src/LoopCarry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ class LoopCarryOverLoop : public IRMutator {
}
if (loads[i][0]->name == loads[j][0]->name &&
next_indices[j].defined() &&
graph_equal(indices[i], next_indices[j]) &&
(graph_equal(indices[i], next_indices[j]) || can_prove(indices[i] == next_indices[j])) &&
vksnk marked this conversation as resolved.
Show resolved Hide resolved
next_predicates[j].defined() &&
graph_equal(predicates[i], next_predicates[j])) {
(graph_equal(predicates[i], next_predicates[j]) || can_prove(predicates[i] == next_predicates[j]))) {
chains.push_back({j, i});
debug(3) << "Found carried value:\n"
<< i << ": -> " << Expr(loads[i][0]) << "\n"
Expand Down