https://bugs.llvm.org/show_bug.cgi?id=40648
Bug ID: 40648
Summary: [DebugInfo@O2] InstCombine drops dbg.value of an
argument
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: CONFIRMED
Keywords: wrong-debug
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected],
[email protected],
[email protected], [email protected]
Blocks: 38768
With the code below, llvm/clang r352480, and command line "-O2 -g -c", the
'nose' argument does not have a location in the output file. This is not the
same as bug 40645 despite being similar code, because the dbg.value records for
'nose' are deleted by InstCombine, and it doesn't leave dbg.value(undef...)
hanging around.
Reproducer is slightly convoluted because I was trying to stimulate
InstCombines instruction sinking between two blocks where control flow always
moves exclusively from one block to exclusively the other block. This would
normally never happen, but the try-catch block forces that to happen.
-------->8--------
struct chin {
int a;
int b;
};
int ext(int a, int b);
int toinline(int a, int b)
{
return 0;
}
int
foo(struct chin nose, int more, int a, int b)
{
try {
ext(a, b);
} catch (int i) {
return 0;
}
more += toinline(nose.a, nose.b);
return more;
}
--------8<--------
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=38768
[Bug 38768] [meta][DebugInfo] Umbrella bug for poor debug experiences
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs