Page MenuHomePhabricator

[DebugInfo@O2][Utils] Undef instead of delete dbg.values in helper func

Authored by Orlando on Nov 22 2019, 9:52 AM.



Related bug:

Static helper function rewriteDebugUsers in Local.cpp deletes dbg.value
intrinsics when it cannot move or rewrite them, or salvage the deleted
instruction's value. It should instead undef them in this case.

This patch fixes that and I've added a test which covers the failing test
case in bz40648. I've updated the unit test Local.ReplaceAllDbgUsesWith
to check for this behaviour (and fixed a typo in the test which would
cause the old test to always pass).

Diff Detail

Event Timeline

Orlando created this revision.Nov 22 2019, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 22 2019, 9:52 AM
vsk accepted this revision.Nov 22 2019, 10:57 AM



Ouch. Thanks for catching this.

This revision is now accepted and ready to land.Nov 22 2019, 10:57 AM

Thanks for the review, committed in 2de23c8364b.

This revision was automatically updated to reflect the committed changes.