<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 - [X86][SSE] Non-temporal loads shouldn't be folded if it can be avoided"
href="https://bugs.llvm.org/show_bug.cgi?id=32743">32743</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86][SSE] Non-temporal loads shouldn't be folded if it can be avoided
</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>enhancement
</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>llvm-dev@redking.me.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>From SSE4.1 we have (V)MOVNTDQA non-temporal vector loads which allows us to
avoid cache pollution; unfortunately these loads currently can be folded which
results in a temporal vector load which will mean that these will then touch
the cache again.
On pre-SSE41 targets we can safely use regular loads and do the fold without
any regression.
This will probably require us to fix both the tablegen patterns and the
memory-folding tables.
llc < %s -mtriple=x86_64-unknown -mcpu=btver2
define <4 x float> @test_arg_v4f32(<4 x float> %arg, <4 x float>* %src) {
%1 = load <4 x float>, <4 x float>* %src, align 16, !nontemporal !1
%2 = fadd <4 x float> %arg, %1
ret <4 x float> %2
}
!1 = !{i32 1}
vaddps (%rdi), %xmm0, %xmm0</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>