<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] Incorrect domain register move to XMM0 for BLENDV instructons"
href="https://bugs.llvm.org/show_bug.cgi?id=47406">47406</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86][SSE] Incorrect domain register move to XMM0 for BLENDV instructons
</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>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>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>The SSE variants of PBLENDVB/BLENDVPD must move the condition mask to XMM0, but
the move instruction that is used is always MOVAPS, not MOVDQA/MOVAPD.
<a href="https://simd.godbolt.org/z/Tdx169">https://simd.godbolt.org/z/Tdx169</a>
define <16 x i8> @blend_slt_v16i8(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2) {
%4 = icmp slt <16 x i8> %2, zeroinitializer
%5 = select <16 x i1> %4, <16 x i8> %1, <16 x i8> %0
ret <16 x i8> %5
}
define <4 x float> @blend_slt_v4f32(<4 x float> %0, <4 x float> %1, <4 x i32>
%2) {
%4 = icmp slt <4 x i32> %2, zeroinitializer
%5 = select <4 x i1> %4, <4 x float> %1, <4 x float> %0
ret <4 x float> %5
}
define <2 x double> @blend_slt_v2f64(<2 x double> %0, <2 x double> %1, <2 x
i64> %2) {
%4 = icmp slt <2 x i64> %2, zeroinitializer
%5 = select <2 x i1> %4, <2 x double> %1, <2 x double> %0
ret <2 x double> %5
}
llc -mattr=+sse4.1
blend_slt_v16i8: # @blend_slt_v16i8
movdqa %xmm0, %xmm3
movaps %xmm2, %xmm0
pblendvb %xmm0, %xmm1, %xmm3
movdqa %xmm3, %xmm0
retq
blend_slt_v4f32: # @blend_slt_v4f32
movaps %xmm0, %xmm3
movaps %xmm2, %xmm0
blendvps %xmm0, %xmm1, %xmm3
movaps %xmm3, %xmm0
retq
blend_slt_v2f64: # @blend_slt_v2f64
movapd %xmm0, %xmm3
movaps %xmm2, %xmm0
blendvpd %xmm0, %xmm1, %xmm3
movapd %xmm3, %xmm0
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>