<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 --- - Less efficient encoding of and using direct object emission" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23744&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=MlmRRNpQy6KnJuC73F4V4fEzCFV8HkelUHO80IaPksU&s=_5mejXGVRvqxFYoA1NoVt9d6iVrs8LzBUUg-6bhKn0U&e=">23744</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Less efficient encoding of and using direct object emission
</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>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>russell_gallop@sn.scee.net
</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>"and" has a less efficient encoding when using direct object emission, compared
to outputting assembly (-O1/2/3).
Found with running check_cfc.py dash_s_no_change on the llvm-test-suite
(r238815).
Reduced from function_try_block.cpp
$ cat test.cpp
static int a;
void fn1() {
if (a)
a = 0;
a = 1;
}
$ clang++ -O1 -c test.cpp && objdump -d test.o
test.o: file format elf64-x86-64
...
0000000000000000 <_Z3fn1v>:
0: 0f b6 05 00 00 00 00 movzbl 0x0(%rip),%eax # 7 <_Z3fn1v+0x7>
7: 25 01 00 00 00 and $0x1,%eax
...
$ clang++ -O1 -c test.cpp -via-file-asm && objdump -d test.o
test.o: file format elf64-x86-64
...
0000000000000000 <_Z3fn1v>:
0: 0f b6 05 00 00 00 00 movzbl 0x0(%rip),%eax # 7 <_Z3fn1v+0x7>
7: 83 e0 01 and $0x1,%eax
...</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>