<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:tra@google.com" title="Artem Belevich <tra@google.com>"> <span class="fn">Artem Belevich</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - clang++ CUDA miscompile with -O1"
href="https://bugs.llvm.org/show_bug.cgi?id=37483">bug 37483</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WONTFIX
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - clang++ CUDA miscompile with -O1"
href="https://bugs.llvm.org/show_bug.cgi?id=37483#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - clang++ CUDA miscompile with -O1"
href="https://bugs.llvm.org/show_bug.cgi?id=37483">bug 37483</a>
from <span class="vcard"><a class="email" href="mailto:tra@google.com" title="Artem Belevich <tra@google.com>"> <span class="fn">Artem Belevich</span></a>
</span></b>
<pre>I can reproduce it on sm_60.
Jonas appears to be correct and that's a problem with ptxas in CUDA-8.
PTX generated by clang is identical for both CUDA-8 and CUDA-9.
However, SASS generated by ptxas is noticeably different. With CUDA-9
the code is very straightforward and you can see two writes, 8 bytes apart,
both with the same value. With CUDA-8, func3 messes up the store to *l_302 and
writes zero to the should_not_change field instead.
ptxas in cuda-8 is known to have number of unfixed issues. So does ptxas in
older cuda-9.x releases. I would suggest updating to more recent CUDA version
or, consider replacing ptxas with the one from CUDA-9.1 (though you will not be
able to compile for sm_20 if you do)</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>