[all-commits] [llvm/llvm-project] 2de23c: [DebugInfo at O2][Utils] Undef instead of delete dbg....

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Mon Nov 25 03:05:26 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2de23c8364babb49fe39d81048cd304a5ac2934e
      https://github.com/llvm/llvm-project/commit/2de23c8364babb49fe39d81048cd304a5ac2934e
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

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

  Log Message:
  -----------
  [DebugInfo at 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




More information about the All-commits mailing list