<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 27, 2014 at 12:30 PM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@gmail.com" target="_blank">benny.kra@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On 27.03.2014, at 20:23, Erik Verbruggen <<a href="mailto:erikjv@me.com">erikjv@me.com</a>> wrote:<br>
<br>
> Actually, I'm wondering if it's better to revert my patch (and yours). The "nightly" test-suite pointed out a regression. If you have a tight for loop, like:<br>
> for (i = 0; i <= 39; i++)<br>
> doSomethingHere;<br>
><br>
> then before the patch it would be:<br>
> %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1<br>
> %exitcond = icmp eq i64 %indvars.iv.next, 40<br>
><br>
> while with the patch it's:<br>
> %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1<br>
> %exitcond = icmp eq i64 %indvars.iv, 39<br>
><br>
> That keeps the "old" %indvars.iv alive. This causes some performance tests to fail, like MultiSource/Benchmarks/MiBench/telecomm-gsm.<br>
><br>
> I Cc-ed d0k because he did the review, so what do you guys think?<br>
<br>
</div>A simple fix would be to check if the add has just one use. I was hoping that this kind of workaround wouldn't be necessary anymore but it looks like we still need it in this case :|</blockquote><div><br></div>
<div>I'm not really an optimizer person, so whatever works for you guys, revert or fix forward. I'm mostly concerned with the miscompile, and that has a test case now. :)</div></div></div></div>