<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 - [ARM] Expressions incorrectly reordered by optimization"
href="https://bugs.llvm.org/show_bug.cgi?id=49384">49384</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ARM] Expressions incorrectly reordered by optimization
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</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>enhancement
</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>xtkoba@gmail.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=24579" name="attach_24579" title="A reproducer code derived from the Ruby programming language project">attachment 24579</a> <a href="attachment.cgi?id=24579&action=edit" title="A reproducer code derived from the Ruby programming language project">[details]</a></span>
A reproducer code derived from the Ruby programming language project
When supplied with -O2 or higher (-O3, -Os or -Oz) optimization option, clang
incorrectly reorders two expressions for 32-bit ARM targets.
This issue was first discovered for Android (with target
armv7a-linux-androideabi16), but it is reproducible for GNU/Linux (with target
armv7a-softfloat-linux-gnueabi).
A reproducer code written in C is attached. When compiled with -O2
-DWORKAROUND=0 and run, it aborts due to assertion failure. This assertion is
expected to hold at any time.
I suppose this issue is specific to 32-bit ARM, and I confirmed that the
reproducer code exits normally with targets
{aarch64,i686,powerpc64le,riscv64,x86_64}-unknown-linux-gnu.
This issue was discovered in the Ruby programming language project and was
first reported to <a href="https://bugs.ruby-lang.org/issues/17540">https://bugs.ruby-lang.org/issues/17540</a></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>