<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Bit-Tracking Dead Code Elimination appears to destroy llvm.dbg.value's argument"
href="https://llvm.org/bugs/show_bug.cgi?id=26587">26587</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Bit-Tracking Dead Code Elimination appears to destroy llvm.dbg.value's argument
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Transformation Utilities
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>aprantl@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Found in r260628.
Compiling the following example with -O -mllvm -print-after-all:
void h();
int g();
void f() {
h();
int a = g();
h();
}
*** IR Dump After Demanded bits analysis ***
; Function Attrs: nounwind ssp uwtable
define void @f() #0 !dbg !4 {
entry:
tail call void (...) @h() #4, !dbg !14
%call = tail call i32 (...) @g() #4, !dbg !15
tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !8,
metadata !16), !dbg !17
tail call void (...) @h() #4, !dbg !18
ret void, !dbg !19
}
*** IR Dump After Bit-Tracking Dead Code Elimination ***
; Function Attrs: nounwind ssp uwtable
define void @f() #0 !dbg !4 {
entry:
tail call void (...) @h() #4, !dbg !14
%call = tail call i32 (...) @g() #4, !dbg !15
tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !8, metadata
!16), !dbg !17
^^^^^
tail call void (...) @h() #4, !dbg !18
ret void, !dbg !19
}
which then causes the debug info to present "a" as a constant zero.
0x0000004a: TAG_variable [3]
AT_const_value( 0x0000000000000000 )
AT_name( "a" )
AT_decl_file( "/Volumes/Data/llvm/test.c" )
AT_decl_line( 5 )
AT_type( {0x00000057} ( int ) )</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>