[PATCH] D43956: [DebugInfo] Discard invalid DBG_VALUE instructions in LiveDebugVariables

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 09:37:16 PST 2018

aprantl added a comment.

> But maybe it is a bug that LiveDebugVariables removes all DBG_VALUE undef, ...?

I think it is.

If you compile the function at -O1 (to force the constant to be described with a dbg.value)

void foo() {

  // single basic block
  int x = 42;
  x = 23;


and replace the second dbg.value with a dbg.value(undef) in the LLVM IR and run it through llc, do we get the range of the constant 42 correct in the resulting location list for x? Does it end before the second call to bar()?



More information about the llvm-commits mailing list