<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] Add pass to insert EMMS/FEMMS instructions to separate MMX and X87 states"
href="https://bugs.llvm.org/show_bug.cgi?id=42319">42319</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] Add pass to insert EMMS/FEMMS instructions to separate MMX and X87 states
</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, efriedma@quicinc.com, hans@chromium.org, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, nicolasweber@gmx.de, rjmccall@apple.com, rnk@google.com, spatel+llvm@rotateright.com, wei3.xiao@intel.com
</td>
</tr>
<tr>
<th>Depends on</th>
<td>35982
</td>
</tr>
<tr>
<th>Blocks</th>
<td>41029
</td>
</tr></table>
<p>
<div>
<pre>As discussed on <a href="https://reviews.llvm.org/D59744">https://reviews.llvm.org/D59744</a>, we currently have no way to
automatically separate MMX and x87 instructions - we rely on manual insertion
of _mm_empty() (EMMS) intrinsics.
Ideally we need something like the X86VZeroUpper pass which can recognise when
MMX/X87 instructions have been used, insert EMMS/FEMMS instructions where
appropriate and ensure that MMX/X87 ops don't cross the barrier (see Bug
#35982).
Given the high cost of EMMS, we may want to make this pass opt-in - for example
only enable it by default for the i386 ABI change (see <a class="bz_bug_link
bz_status_NEW "
title="NEW - The __m64 not passed according to i386 ABI"
href="show_bug.cgi?id=41029">Bug #41029</a>).</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - [MMX] POSTRAScheduler disarrange emms and mmx instruction"
href="https://bugs.llvm.org/show_bug.cgi?id=35982">Bug 35982</a>] [MMX] POSTRAScheduler disarrange emms and mmx instruction
</li>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - The __m64 not passed according to i386 ABI"
href="https://bugs.llvm.org/show_bug.cgi?id=41029">Bug 41029</a>] The __m64 not passed according to i386 ABI
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>