[PATCH] D150216: Add support for salvaging debug info from icmp instrcuctions.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 10:27:43 PDT 2023


aprantl added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1996
+  case CmpInst::ICMP_SGE:
+    return dwarf::DW_OP_ge;
+  case CmpInst::ICMP_ULT:
----------------
I guess the assumption here is that in the typed stack the signedness of the operation is implicit? Might be good to document that here.


================
Comment at: llvm/test/DebugInfo/salvage-icmp.ll:15
+  %icmp1 = icmp ne i32 %a, 0, !dbg !15
+  call void @llvm.dbg.value(metadata !DIArgList(i1 %icmp1), metadata !16, metadata !DIExpression()), !dbg !13
+  %mul = mul nsw i32 %a, %b, !dbg !17
----------------
Can you add tests for the other operations, too?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150216/new/

https://reviews.llvm.org/D150216



More information about the llvm-commits mailing list