This is an archive of the discontinued LLVM Phabricator instance.

[LoopPredication] Fix MemorySSA crash in predicateLoopExits
ClosedPublic

Authored by anna on Sep 2 2021, 2:28 PM.

Details

Summary

The attached testcase crashes without the patch (Not the same accesses
in the same order).

When we move instructions before another instruction, we also need to
update the memory accesses corresponding to it.

Diff Detail

Event Timeline

anna created this revision.Sep 2 2021, 2:28 PM
anna requested review of this revision.Sep 2 2021, 2:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2021, 2:28 PM
reames added a comment.Sep 2 2021, 4:04 PM

I'll defer to @asbirlea. This looks slightly complicated for what should be a simple update, but she'll know if there's a cleaner way.

asbirlea accepted this revision.Sep 2 2021, 5:05 PM

This is the right API to call for this instruction move.

This revision is now accepted and ready to land.Sep 2 2021, 5:05 PM
anna added a comment.Sep 2 2021, 6:25 PM

Thank you for the prompt reviews!

This revision was landed with ongoing or failed builds.Sep 2 2021, 6:26 PM
This revision was automatically updated to reflect the committed changes.