<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 - Loop idiom recognizer miscompiles a memcmp loop"
href="https://bugs.llvm.org/show_bug.cgi?id=43206">43206</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Loop idiom recognizer miscompiles a memcmp loop
</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>Linux
</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>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>maltsevm@gmail.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=22466" name="attach_22466" title="Source code">attachment 22466</a> <a href="attachment.cgi?id=22466&action=edit" title="Source code">[details]</a></span>
Source code
After a recent commit
commit 5c9f3cfec78f9e9ae013de9a0d092a68e3e79e00
Author: Roman Lebedev <<a href="mailto:lebedev.ri@gmail.com">lebedev.ri@gmail.com</a>>
Date: Fri Aug 30 09:51:23 2019 +0000
[LoopIdiomRecognize] BCmp loop idiom recognition
...
some of our internal tests started failing on AArch64 and ARM targets.
When the attached reproducer test.c is compiled with the following options:
clang -c -O3 --target=aarch64-arm-none-eabi -march=armv8-a+simd+fp+nocrypto
-std=c99 test.c -o test.o
then linked and run on a model it outputs: "RESULT: FAILED". The same code
compiled with the previous LLVM commit outputs the expected string "RESULT:
PASSED"
Bugpoint points to the loop-idiom pass. The attached bitcode demonstrates the
problem (it produces the correct output, but when run through 'opt
-loop-idiom', the output becomes incorrect).</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>