[all-commits] [llvm/llvm-project] b38d77: [SimplifyCFG] Remap rewritten debug intrinsic oper...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Fri May 8 11:10:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b38d77f185c53cb4bf108f0c29df1d6d7cfe13b4
      https://github.com/llvm/llvm-project/commit/b38d77f185c53cb4bf108f0c29df1d6d7cfe13b4
  Author: Ricky Zhou <ricky+llvm at rzhou.org>
  Date:   2020-05-08 (Fri, 08 May 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    A llvm/test/DebugInfo/simplify-cfg-preserve-dbg-values.ll

  Log Message:
  -----------
  [SimplifyCFG] Remap rewritten debug intrinsic operands.

FoldBranchToCommonDest clones instructions to a different basic block,
but handles debug intrinsics in a separate path. Previously, when
cloning debug intrinsics, their operands were not updated to reference
the correct cloned values. As a result, we would emit debug.value
intrinsics with broken operand references which are discarded in later
passes. This leads to incorrect debuginfo that reports incorrect values
for variables.

Fix this by remapping debug intrinsic operands when cloning them.

Fixes https://bugs.llvm.org/show_bug.cgi?id=45667.

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




More information about the All-commits mailing list