[llvm] [DebugInfo][ConstraintElimination] Fix debug value loss in replacing comparisons with the speculated constants (PR #136839)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 08:03:06 PDT 2025


================
@@ -0,0 +1,65 @@
+; RUN: opt < %s -passes=constraint-elimination -S | FileCheck %s
+
+; Check that checkAndReplaceCondition() salvages the debug value information after replacing
+; the conditions (`%t.1` in this test) with the speculated constants (GitHub Issue #135736).
+; In particular, the debug value record uses are replaced if their `DFSNumIn`s and `DFSNumOut`s
+; on `DominatorTree` satisfy the contraint.
----------------
OCHyams wrote:

This comment feels slightly awkward to parse - perhaps something like "In particular, debug uses are replaced if the debug record is dominated by the condition fact" (@fhahn might be able to produce better wording?)

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


More information about the llvm-commits mailing list