[PATCH] D48331: [DebugInfo][InstCombine] Preserve DI after combining zext instructions

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 10:05:26 PDT 2018


vsk added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:1084
+    // referring to the zext being replaced.
+    // TODO: this should work for vectors as well, possibly
+    // via the use of dwarf fragments
----------------
Nit -- please capitalize this and use the same line wrapping as the surrounding code.


================
Comment at: test/Transforms/InstCombine/cast-mul-select.ll:3
 ; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt -debugify -instcombine -S < %s | FileCheck %s -check-prefix DBGINFO
 
----------------
gramanas wrote:
> Should I add a note saying that the DBGINFO checks are not autogenerated? 
No, but please remove the note about the checks being autogenerated, because with this change they no longer are.


================
Comment at: test/Transforms/InstCombine/cast-mul-select.ll:20
+; DBGINFO-NEXT:    [[D:%.*]] = and i32 {{.*}}
+; DBGINFO-NEXT:    call void @llvm.dbg.value(metadata i32 [[D]], metadata ![[DILocVarD:[0-9]+]]
+
----------------
We don't gain much by capturing DILocVar{C,D} here. It's fine to not do this, because we don't need to check what's inside the variables.


Repository:
  rL LLVM

https://reviews.llvm.org/D48331





More information about the llvm-commits mailing list