[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:05 PDT 2025


================
@@ -0,0 +1,83 @@
+; RUN: opt < %s -passes=constraint-elimination -S | FileCheck %s
+
+; Check that checkAndReplaceCondition() salvages the debug value information after replacing
+; the conditions (`%c.1` and `%t.2` in this test) with the speculated constants (GitHub Issue
+; #135736).
+; In particular, the debug value record uses should not be replaced if they comes before the
+; context instrtuction (e.g., `%t.2` in this example).
----------------
OCHyams wrote:

nit: comes -> come

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


More information about the llvm-commits mailing list