<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:hiraditya@msn.com" title="hiraditya <hiraditya@msn.com>"> <span class="fn">hiraditya</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - gvn-hoist produces wrong code with "opt -sroa -loop-unswitch -loop-rotate -sccp -jump-threading -gvn-hoist""
href="https://bugs.llvm.org/show_bug.cgi?id=42283">bug 42283</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;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>unassignedbugs@nondot.org
</td>
<td>hiraditya@msn.com
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>hiraditya@msn.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - gvn-hoist produces wrong code with "opt -sroa -loop-unswitch -loop-rotate -sccp -jump-threading -gvn-hoist""
href="https://bugs.llvm.org/show_bug.cgi?id=42283#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - gvn-hoist produces wrong code with "opt -sroa -loop-unswitch -loop-rotate -sccp -jump-threading -gvn-hoist""
href="https://bugs.llvm.org/show_bug.cgi?id=42283">bug 42283</a>
from <span class="vcard"><a class="email" href="mailto:hiraditya@msn.com" title="hiraditya <hiraditya@msn.com>"> <span class="fn">hiraditya</span></a>
</span></b>
<pre>Doesn't repro in llvm trunk and gvn-hoist hoists loads, and scalars.
>From the testcase small.c attached in the comments above.
$clang -O3 -c -emit-llvm -mllvm -disable-llvm-optzns small.c
$opt -sroa -loop-unswitch -loop-rotate -sccp -jump-threading -gvn-hoist
small.bc -o small-opt.bc
$clang small-opt.bc -o small3.out && ./small3.out
28
And:
./bin/opt -sroa -loop-unswitch -loop-rotate -sccp -jump-threading -gvn-hoist
small.bc -o small-opt.bc -stats
```
2 gvn-hoist - Number of instructions hoisted
1 gvn-hoist - Number of loads hoisted
1 gvn-hoist - Number of loads removed
2 gvn-hoist - Number of instructions removed
```</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>