<html>
<head>
<base href="https://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 --- - assembler: suboptimal encoding of memory operand" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24308&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=g3gMuNceZF-yQi3bexJ7e5GMg65uoeigfWLnyJLo4lg&s=zxvsYsHiABXVAawnrtS3Q5i7Fl1W5-IvBPEEHU24jf4&e=">24308</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>assembler: suboptimal encoding of memory operand
</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>Windows NT
</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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Wolfgang_Pieb@playstation.sony.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>Given the following assembly input
vpaddd 16+0-4(%rdi, %rax), %xmm0, %xmm0
vpaddd 16+(0-4)(%rdi, %rax), %xmm0, %xmm0
vpaddd (16+0-4)(%rdi, %rax), %xmm0, %xmm0
vpaddd (16+0)-4(%rdi, %rax), %xmm0, %xmm0
clang creates suboptimal object code for the last instruction (using a 32-bit
offset instead of an 8-bit one):
Disassembly of section .text:
0000000000000000 <.text>:
0: c5 f9 fe 44 07 0c vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
6: c5 f9 fe 44 07 0c vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
c: c5 f9 fe 44 07 0c vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
12: c5 f9 fe 84 07 0c 00 vpaddd 0xc(%rdi,%rax,1),%xmm0,%xmm0
19: 00 00</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>