HomePhabricator

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

Authored by Orlando on Nov 25 2019, 1:02 AM.

Description

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

Summary:
Related bug: https://bugs.llvm.org/show_bug.cgi?id=40648

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).

Reviewers: aprantl, vsk, djtodoro, probinson

Reviewed By: vsk

Subscribers: hiraditya, llvm-commits

Tags: debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D70604

Details

Committed
OrlandoNov 25 2019, 2:55 AM
Reviewer
vsk
Differential Revision
D70604: [DebugInfo@O2][Utils] Undef instead of delete dbg.values in helper func
Parents
rG29b4d8f19e30: [AVR] Fix endianness handling in AVR MC
Branches
Unknown
Tags
Unknown