[PATCH] D70604: [DebugInfo at O2][Utils] Undef instead of delete dbg.values in helper func

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 09:58:16 PST 2019


Orlando created this revision.
Orlando added reviewers: aprantl, vsk, djtodoro, probinson.
Orlando added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70604

Files:
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/DebugInfo/X86/dbg-value-dropped-instcombine.ll
  llvm/unittests/Transforms/Utils/LocalTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70604.230674.patch
Type: text/x-patch
Size: 7168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191122/ef123b7b/attachment.bin>


More information about the llvm-commits mailing list