https://bugs.llvm.org/show_bug.cgi?id=41475
Bug ID: 41475
Summary: [DebugInfo@O2] InstCombine drops value of a boolean
argument
Product: libraries
Version: 8.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Transformation Utilities
Assignee: unassignedb...@nondot.org
Reporter: wolfgang_p...@playstation.sony.com
CC: llvm-bugs@lists.llvm.org
bool foo(bool b) {
return b;
}
//========= end of source =============
When compiled with -O2 -g, there is no location information for 'b'. The reason
appears to be the instcombine pass eliminating the zext that expands the
incoming parameter to an i8, while not being able to salvage the associated
debug info:
BEFORE:
%frombool = zext i1 %b to i8
call void @llvm.dbg.value(metadata i8 %frombool, metadata !12, ...
AFTER:
<zext removed>
call void @llvm.dbg.value(metadata i8 undef, metadata !12,
The core algorithm attempting the salvaging is in salvageDebugInfo() in
Transform/Utils/Local.cpp, which is why the component of this Bugzilla is
chosen this way.
Bug 40648 also seems to address problems with salvaging debug info and
instcombine, though they seem more complex there.
--
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