This is an archive of the discontinued LLVM Phabricator instance.

Make sure PHIElimination doesn't copy debug locations across basic blocks.
ClosedPublic

Authored by aprantl on Apr 20 2021, 1:35 PM.

Details

Summary

PHIElimination may insert copy instructions in multiple basic
blocks. Moving debug locations across basic block boundaries would be
misleading as illustrated by the test case.

rdar://75463656

Diff Detail

Event Timeline

aprantl created this revision.Apr 20 2021, 1:35 PM
aprantl requested review of this revision.Apr 20 2021, 1:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 1:35 PM
aprantl added inline comments.Apr 20 2021, 1:40 PM
llvm/test/CodeGen/AArch64/PHIElimination-debugloc.mir
1

Yes, I manually created this test by copy&pasting llvm/test/CodeGen/AArch64/PHIElimination-crash.mir and adding debug info to it.

vsk accepted this revision.Apr 20 2021, 2:37 PM

Thanks, lgtm!

This revision is now accepted and ready to land.Apr 20 2021, 2:37 PM