<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - codeview assertion fails on lowerBound"
href="https://bugs.llvm.org/show_bug.cgi?id=47287">47287</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>codeview assertion fails on lowerBound
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jistone@redhat.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Blocks</th>
<td>46725
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23885" name="attach_23885" title="IR for the unboxed-closures-unique-type-id.rs test">attachment 23885</a> <a href="attachment.cgi?id=23885&action=edit" title="IR for the unboxed-closures-unique-type-id.rs test">[details]</a></span>
IR for the unboxed-closures-unique-type-id.rs test
We encountered this assertion in Rust x86_64-msvc trying to upgrade to LLVM 11.
<a href="https://github.com/rust-lang/rust/pull/73526#issuecomment-678576555">https://github.com/rust-lang/rust/pull/73526#issuecomment-678576555</a>
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
1595 │ assert(!Subrange->getRawLowerBound() &&
1596 │ "codeview doesn't support subranges with lower bounds");
The IR for that failed test is attached. It contains this:
!157 = !DISubrange(count: 3, lowerBound: 0)
The actual assertion was changed in D80197, specifically here:
<a href="https://github.com/llvm/llvm-project/commit/d20bf5a7258d4b6a7f017a81b125275dac1aa166#diff-8412e58a7e99d6349b9f9418af573792">https://github.com/llvm/llvm-project/commit/d20bf5a7258d4b6a7f017a81b125275dac1aa166#diff-8412e58a7e99d6349b9f9418af573792</a>
I confirmed that our IR passes the assertion before that commit, when it
checked "Subrange->getLowerBound() == 0". I think that
"!Subrange->getRawLowerBound()" is not equivalent though because that raw
return value is a "Metadata *", so the assertion is now checking that it's
NULL. This is different than having the lowerBound present with a constant
value 0.</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - [meta] 11.0.0 Release Blockers"
href="https://bugs.llvm.org/show_bug.cgi?id=46725">Bug 46725</a>] [meta] 11.0.0 Release Blockers
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>