<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 --- - [x86] consecutive store merging failure"
href="https://llvm.org/bugs/show_bug.cgi?id=24654">24654</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[x86] consecutive store merging failure
</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>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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>spatel+llvm@rotateright.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>$ cat merge.ll
define void @merge_8_float_zero_stores(float* %ptr) {
%idx0 = getelementptr float, float* %ptr, i64 0
%idx1 = getelementptr float, float* %ptr, i64 1
%idx2 = getelementptr float, float* %ptr, i64 2
%idx3 = getelementptr float, float* %ptr, i64 3
%idx4 = getelementptr float, float* %ptr, i64 4
%idx5 = getelementptr float, float* %ptr, i64 5
%idx6 = getelementptr float, float* %ptr, i64 6
%idx7 = getelementptr float, float* %ptr, i64 7
store float 0.0, float* %idx0, align 4
store float 0.0, float* %idx1, align 4
store float 0.0, float* %idx2, align 4
store float 0.0, float* %idx3, align 4
store float 0.0, float* %idx4, align 4
store float 0.0, float* %idx5, align 4
store float 0.0, float* %idx6, align 4
store float 0.0, float* %idx7, align 4
ret void
}
I think this should be an xor to generate the zero and one 32-byte AVX store,
but:
$ ./llc -o - merge.ll -mattr=avx
...
movl $0, (%rdi)
movl $0, 4(%rdi)
movl $0, 8(%rdi)
movl $0, 12(%rdi)
movl $0, 16(%rdi)
movl $0, 20(%rdi)
movq $0, 24(%rdi) <--- six 4-byte stores and one 8-byte store?!
retq</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>