https://bugs.llvm.org/show_bug.cgi?id=44881
Bug ID: 44881
Summary: [DebugInfo@O2] DAGCombine drops easily salvageable
variable location
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Keywords: wrong-debug
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedb...@nondot.org
Reporter: jeremy.morse.l...@gmail.com
CC: chackz0...@gmail.com, greg.bedw...@sony.com,
llvm-bugs@lists.llvm.org, orlando.hy...@sony.com,
paul.robin...@am.sony.com, stephen.to...@sony.com,
v...@apple.com
Blocks: 38768
Spun off from bug 39724, Davides test case which I copy below has 'l' optimised
out in the fn1 function. The cause appears to be a DAGCombine that drops the
multiply, which the SelectionDAG salvager can't recover. This is true of todays
master, 2733ad2c24 ish.
--------8<--------
a.c:
extern void other_func(long int, long int, long int);
__attribute__((noinline))
int fn1 (long int x, long int y, long int z) {
int l = x * 2;
int q = y * z;
other_func(x, y, z);
return l + q;
}
__attribute__((noinline)) long int
fn2 (long int a, long int b, long int c)
{
long int q = 2 * a;
return fn1 (5, 6, 7);
}
int main(void) {
return fn2(14, 23, 34);
}
b.c:
void other_func(long int a, long int b, long int c) {}
built with: ${CC} a.c b.c -O3 -g
-------->8--------
I guess this ticket can more broadly represents the fact that all the folding /
morphing in DAGCombine isn't robustly salvaged.
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
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs