<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Optimization error - Generates an "orr" command instead of "eor""
href="http://llvm.org/bugs/show_bug.cgi?id=16109">16109</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Optimization error - Generates an "orr" command instead of "eor"
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.1
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: ARM
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ashaltiel@nds.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10565" name="attach_10565" title="LLVM-IR code example">attachment 10565</a> <a href="attachment.cgi?id=10565&action=edit" title="LLVM-IR code example">[details]</a></span>
LLVM-IR code example
When a variable is being XOR'ed with immediate values consecutively, the
ARM-backend calculates their commulative xor (correctly), but (in certain
cases) instead of XORing it with the original value, it uses an OR (orr)
instruction.
In the attached .ll file - notice the lines
%C033 = ptrtoint i8* %LGE1 to i64
%A34 = xor i64 %C033, 1889002644
%A35 = xor i64 %A34, 148
Which translate (using llc -march=arm) to:
ldr r0, .LCPI0_2
orr r4, r4, r0</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>