Page MenuHomePhabricator

[mlir][scf] Fix a bug in scf::ForOp loop unroll with an epilogue
Needs RevisionPublic

Authored by tatianashp on Sat, Sep 12, 7:22 PM.



Fixes a bug in formation and simplification of an epilogue loop generated
during loop unroll of scf::ForOp (

Diff Detail

Event Timeline

tatianashp created this revision.Sat, Sep 12, 7:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptSat, Sep 12, 7:22 PM
tatianashp requested review of this revision.Sat, Sep 12, 7:22 PM
mehdi_amini accepted this revision.Sat, Sep 12, 9:30 PM
mehdi_amini added inline comments.

Can you remove the -allow-unregistered-dialect here and use std.add (or another test operation), and same for types?

This revision is now accepted and ready to land.Sat, Sep 12, 9:30 PM
tatianashp edited the summary of this revision. (Show Details)Sun, Sep 13, 12:57 PM
bondhugula requested changes to this revision.Sun, Sep 13, 11:09 PM
bondhugula added a subscriber: bondhugula.
bondhugula added inline comments.

Nit: consider using getTerminator() instead of back() for better readability.


Could you make it 11 iterations to make the test stronger (or an additional one if you prefer)? Is coverage missing for a symbolic upper bound in the presence of return values?

This revision now requires changes to proceed.Sun, Sep 13, 11:09 PM
mehdi_amini added inline comments.Sun, Sep 13, 11:13 PM

I believe the crash from PR46689 only exists when the epilogue has a single iteration