[llvm] [Transforms] Debug values are not remapped when cloning. (PR #87747)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 04:23:26 PDT 2024


================
@@ -136,6 +137,8 @@ void DbgVariableIntrinsic::replaceVariableLocationOp(Value *OldValue,
   auto Locations = location_ops();
   auto OldIt = find(Locations, OldValue);
   if (OldIt == Locations.end()) {
+    if (AllowEmpty)
+      return;
----------------
CarlosAlbertoEnciso wrote:

The included test fails:
`llvm/test/Transforms/CallSiteSplitting/callsite-split-debug.ll`

This is the line that triggers the assertion:
`  call void @llvm.dbg.value(metadata !DIArgList(i16 %c, i16 %c), metadata !7, metadata !DIExpression()), !dbg !8
`

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


More information about the llvm-commits mailing list