[llvm] [DebugInfo][RemoveDIs] Support cloning and remapping DPValues (PR #72546)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 07:50:35 PST 2023


================
@@ -0,0 +1,108 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
+; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s --try-experimental-debuginfo-iterators | FileCheck %s
+;
+;; Check that when we duplicate the load in the loop header, we also duplicate
+;; the corresponding dbg.value.
+;; FIXME: the hoisted load dominates the duplicated dbg.value, however as it's
+;; not subsequently used in the loop, so it doesn't get remapped into the
+;; debug user and we get a undef/poison dbg.value. This is suboptimal, but it's
+;; important that it gets duplicated nonetheless.
----------------
OCHyams wrote:

> important that it gets duplicated nonetheless.

"it" being "the behaviour"?

https://github.com/llvm/llvm-project/pull/72546


More information about the llvm-commits mailing list