<html>
<head>
<base href="https://bugs.webkit.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 - DFG peephole does not have effect on CompareEq / CompareStrictEq because of MovHint"
href="https://bugs.webkit.org/show_bug.cgi?id=149713">149713</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>DFG peephole does not have effect on CompareEq / CompareStrictEq because of MovHint
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>utatane.tea@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Currently, we have op_jless, op_jgreater etc. But we don't have op_jeq.
Instead we compile the following
function eq(a, b)
{
if (a === b)
return true;
return false;
}
to
eq#CU1c7h:[0x7fb57e6dd268->0x7fb57e46c200, NoneFunctionCall, 17]: 17 m_instructions; 136 bytes; 3 parameter(s); 8 callee register(s); 6 variable(s)
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] eq loc6, arg1, arg2
[ 10] jfalse loc6, 5(->15)
[ 13] ret True(const1)
[ 15] ret False(const2)
So, in DFG, between op_eq and op_jfalse, we have MovHint to store the result of op_eq.
As a result, detectPeepHoleBranch() never detects peep hole for that case.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>