<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 - Miscompile under PowerPC caused by commit 5415fef3abef"
href="https://bugs.llvm.org/show_bug.cgi?id=47891">47891</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Miscompile under PowerPC caused by commit 5415fef3abef
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>saugustine@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24075" name="attach_24075" title="fragment of boringssl multi-word shift code">attachment 24075</a> <a href="attachment.cgi?id=24075&action=edit" title="fragment of boringssl multi-word shift code">[details]</a></span>
fragment of boringssl multi-word shift code
Commit 5415fef3abef causes a miscompile in the attached test case under
powerpc.
The attached program demonstrates the issue. It appears to me that carry or
next_carry is calculated wrong for the ninth iteration of the loop. Of note,
the loop must be fully unrolled for this to happen. If I perturb the code so
that it isn't unrolled, or use -fno-unroll-loops, everything works fine.
Output under powerpc:
Failed
Correct Actual
0: c71c71c71c71c9fc c71c71c71c71c9fc
1: 5b91f6e791f6e791 5b91f6e791f6e791
2: 6000000000000005 6000000000000005
3: 9e79e79e79e79ed8 9e79e79e79e79ed8
4: 4bf2c78af2c7816e 4bf2c78af2c7816e
5: a53d3d3d3d3d3d3d a53d3d3d3d3d3d3d
6: 7555555555555558 7555555555555558
7: cf3cf3cf3cf3cfcd cf3cf3cf3cf3cfcd
8: d3cfa5effb5effcf d3cfa5effb5effcf
9: 0000000000000000 0000000000000001
10: 0000000000000000 0000000000000000</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>