<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 - VectorLegalizer::ExpandUINT_TO_FLOAT -- wrong results for v*f64"
href="https://bugs.llvm.org/show_bug.cgi?id=36391">36391</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>VectorLegalizer::ExpandUINT_TO_FLOAT -- wrong results for v*f64
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ruttenberg@reservoir.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19866" name="attach_19866" title="Proposed fix">attachment 19866</a> <a href="attachment.cgi?id=19866&action=edit" title="Proposed fix">[details]</a></span>
Proposed fix
This code inadvertently does a 32 bit calculation whose result must be 64 bits,
resulting in incorrect floating point conversions.
When the underlying components of the vector are f64, BW is 64 and the shift:
1 << (BW/2) results in an undefined result when BW >= 31.
We need to write as lL << (BW/2) in order to do the shift in 64 bits with a 64
bit result. Patch attached.</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>