This is an archive of the discontinued LLVM Phabricator instance.

[LoopRotate] Add test case to show dbg value problem
ClosedPublic

Authored by bjope on Dec 13 2019, 10:14 AM.

Details

Summary

In commit d60f34c20a2f31335c8d5626e (llvm-svn 317128,
PR35113) MergeBlockIntoPredecessor was changed into
discarding some dbg.value intrinsics referring to
PHI values, post-splice due to loop rotation.

That elimination of dbg.value intrinsics does not
consider which dbg.value to keep based on the context.
Such as always keeping the one that comes first textually,
or the need to keep several of them in case the variable
is changing it's value several times inside the basic block.

In the past that hasn't been such a big problem since
CodeGenPrepare::placeDbgValues has moved the dbg.value
to be next to the PHI node anyway. But after commit
00e238896cd8ad3a7d7 CodeGenPrepare isn't doing that
any longer, so we need to be more careful when avoiding
duplicate dbg.value intrinsics in MergeBlockIntoPredecessor.

This patch is just a pre commit of the test case.

Change-Id: I2a428513312a7c3b62db453c03aaf00d436189de

Event Timeline

bjope created this revision.Dec 13 2019, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2019, 10:15 AM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 16 2019, 2:49 AM
This revision was automatically updated to reflect the committed changes.