<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] cvtsi2ss, cvtsi2sd, and cvtss2sd intrinsic sequences from clang produce unnecessary vmovss/vmovsd instructions"
href="https://llvm.org/bugs/show_bug.cgi?id=30926">30926</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] cvtsi2ss, cvtsi2sd, and cvtss2sd intrinsic sequences from clang produce unnecessary vmovss/vmovsd instructions
</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>craig.topper@gmail.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>The code emitted by clang's intrinsics for cvtsi2ss, cvtsi2sd, and cvtss2sd is
lowered to a code sequence that involves and extra movss/movsd or a blend.
For example:
_test_mm_cvtsi32_sd:
vcvtsi2sdl %edi, %xmm1, %xmm1
vblendpd $1, %xmm1, %xmm0, %xmm0
retq
To fix this we need to add more patterns for detecting X86ISD::MOVSS/SD or
blend and emit the intrinsic version of the instruction instead. Similar to
what is being done for ADD/SUB/MUL/DIV.</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>