<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Reassociate: should we convert c*c+c+c+c*c*c to c*(c*c+c+2)? We currently have c*(c*c+c)+c*2."
href="https://bugs.llvm.org/show_bug.cgi?id=13549">bug 13549</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Component</td>
<td>new bugs
</td>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<td style="text-align:right;">Version</td>
<td>unspecified
</td>
<td>trunk
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>llvm-dev@redking.me.uk
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Product</td>
<td>new-bugs
</td>
<td>libraries
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Reassociate: should we convert c*c+c+c+c*c*c to c*(c*c+c+2)? We currently have c*(c*c+c)+c*2."
href="https://bugs.llvm.org/show_bug.cgi?id=13549#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Reassociate: should we convert c*c+c+c+c*c*c to c*(c*c+c+2)? We currently have c*(c*c+c)+c*2."
href="https://bugs.llvm.org/show_bug.cgi?id=13549">bug 13549</a>
from <span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span></b>
<pre>Resolving - this was fixed sometime around clang 3.8
<a href="https://godbolt.org/z/c7vvdc">https://godbolt.org/z/c7vvdc</a>
define i64 @_Z14ComputeMemSizei(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, %2
%4 = add nuw nsw i64 %3, 2
%5 = mul i64 %4, %2
%6 = add i64 %5, %3
ret i64 %6
}</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>