This is an archive of the discontinued LLVM Phabricator instance.

[mlir][scf] Fix bug in peelForLoop
ClosedPublic

Authored by springerm on Aug 2 2021, 11:30 PM.

Details

Summary

Insertion point should be set before creating new operations.

Diff Detail

Event Timeline

springerm created this revision.Aug 2 2021, 11:30 PM
springerm requested review of this revision.Aug 2 2021, 11:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2021, 11:30 PM
nicolasvasilache accepted this revision.Aug 3 2021, 7:29 AM

can you also add a simple test?

This revision is now accepted and ready to land.Aug 3 2021, 7:29 AM

can you also add a simple test?

This bug is only triggered when calling peelForLoop with a builder who's insertion point is somewhere else. That cannot happen with the peel-for-loop pass that I am using for unit tests.

This revision was automatically updated to reflect the committed changes.