[PATCH] D70040: Clang-trunk Generates Wrong Debug values with -O1

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 03:40:39 PST 2019


jmorse added a comment.

Looks good, with a couple of nits inline. Thanks for tracking this down!



================
Comment at: llvm/test/Transforms/BDCE/pr41925.ll:2
+; Check for setting dbg.value undef which depends on instruction which is going to be dead
+; RUN: opt -bdce %s -S | FileCheck %s
+ at b = common dso_local local_unnamed_addr global i8 0, align 1, !dbg !0
----------------
As the reproducer in PR41925 is small, could you include the source code here? (I'm assuming the IR comes from that). It'll make it easier for someone reading this test to understand what it's doing.


================
Comment at: llvm/test/Transforms/BDCE/pr41925.ll:72-74
+attributes #0 = { noinline nounwind uwtable }
+attributes #1 = { nounwind readnone speculatable willreturn }
+attributes #3 = { nounwind }
----------------
It's best to drop un-necessary attributes, as they can become a maintenance burden.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D70040





More information about the llvm-commits mailing list