<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 18, 2013, at 4:43 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Author: atrick<br>Date: Fri Oct 18 18:43:53 2013<br>New Revision: 193015<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=193015&view=rev">http://llvm.org/viewvc/llvm-project?rev=193015&view=rev</a><br>Log:<br>SCEV should use NSW to get trip count for positive nonunit stride loops.<br></div></blockquote><div dir="auto"><br></div>Great!</div><div dir="auto"><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>The most probable reason that we never optimized this before is that<br>we were being careful to handle case where the developer expected a<br>side-effect free infinite loop relying on overflow:<br></div></blockquote></div><br><div>I'm not 100% sure, but I think that the reason is simpler: since NSW was introduced, I think that no one got around to implementing this.  I don't think it was intentionally excluded.   If it is straight-forward, it would be great to handle negative strides as well.</div><div><br></div><div>-Chris</div></body></html>