<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 - [exegesis] Problem with partial register writes"
href="https://bugs.llvm.org/show_bug.cgi?id=50453">50453</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[exegesis] Problem with partial register writes
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llvm-exegesis
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lebedev.ri@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>clement.courbet@gmail.com, gchatelet@google.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>This was initially brought up by Simon Pilgrim.
Currently, znver3 and bdver2 sched models overestimate latencies/throughput
for i8/i16 instructions. For example, a multiplication implicitly uses low i8
of the implicit write i16 register, which causes extra 1cy latency:
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=latency
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-b1ab3e.o
---
mode: latency
key:
instructions:
- 'MUL8r DL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: latency, value: 3.0026, per_snippet_value: 3.0026 }
error: ''
info: ''
assembled_snippet:
B200B000F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2C3
...
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=latency
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-b973e8.o
---
mode: latency
key:
instructions:
- 'XOR8rr AL AL AL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: latency, value: 1.0031, per_snippet_value: 1.0031 }
error: ''
info: ''
assembled_snippet:
B200B00030C030C030C030C030C030C030C030C030C030C030C030C030C030C030C030C0C3
...
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=latency
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-9093d7.o
---
mode: latency
key:
instructions:
- 'XOR8rr AL AL AL'
- 'MUL8r DL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: latency, value: 2.003, per_snippet_value: 4.006 }
error: ''
info: ''
assembled_snippet:
B200B00030C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E2C3
...
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=inverse_throughput
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-21da4b.o
---
mode: inverse_throughput
key:
instructions:
- 'MUL8r DL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: inverse_throughput, value: 3.0029, per_snippet_value: 3.0029 }
error: ''
info: ''
assembled_snippet:
B200B000F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2F6E2C3
...
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=inverse_throughput
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-2e2e4f.o
---
mode: inverse_throughput
key:
instructions:
- 'XOR8rr AL AL AL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: inverse_throughput, value: 1.0028, per_snippet_value: 1.0028 }
error: ''
info: ''
assembled_snippet:
B200B00030C030C030C030C030C030C030C030C030C030C030C030C030C030C030C030C0C3
...
$ ./bin/llvm-exegesis -num-repetitions=10000 -mode=inverse_throughput
--snippets-file=/tmp/test.s
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-43fb9e.o
---
mode: inverse_throughput
key:
instructions:
- 'XOR8rr AL AL AL'
- 'MUL8r DL'
config: ''
register_initial_values:
- 'DL=0x0'
- 'AL=0x0'
cpu_name: znver3
llvm_triple: x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
- { key: inverse_throughput, value: 2.0031, per_snippet_value: 4.0062 }
error: ''
info: ''
assembled_snippet:
B200B00030C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E230C0F6E2C3
...
What would be the best way to workaround that?</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>