This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix infinite loop in collapse
ClosedPublic

Authored by guraypp on Nov 30 2022, 4:54 AM.

Details

Summary

Incrementing counter variable is inside the if statement. If the code does not enter there, the while loop will iterate infinitely. This revision moves the codes outside of if statement.

Diff Detail

Event Timeline

guraypp created this revision.Nov 30 2022, 4:54 AM
guraypp requested review of this revision.Nov 30 2022, 4:54 AM
mravishankar requested changes to this revision.Nov 30 2022, 8:58 AM

Thanks! Could you add a test here?

This revision now requires changes to proceed.Nov 30 2022, 8:58 AM
mravishankar accepted this revision.Dec 2 2022, 10:17 AM
This revision is now accepted and ready to land.Dec 2 2022, 10:17 AM
This revision was automatically updated to reflect the committed changes.