<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On Nov 16, 2013, at 4:11 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 16 November 2013 06:56, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.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="HOEnZb"><div class="h5"><span style="color:rgb(34,34,34)">- getMulExpr constructs a new AddRec with NSW:</span><br></div></div>
<div class="im"><br>
      Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW));<br>
      const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags);<br></div></blockquote><div><br></div><div>Hi Andrew,</div><div><br></div><div>Thanks for looking at this.</div><div><br></div><div>Clearing the flags here makes sense, but it's being too conservative. I'm thinking I'll need something like propagateSafeFlags(...) with knowledge of the loop induction ranges or something else instead of simply relying on later processes to spot the problems.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><span style="color:rgb(34,34,34)">The clearing of NW does not need to happen in your case (NSW/NUW should always imply NW). You could try this and see if it fixes the problem:</span><br>
</div>
<br>
      Flags = AddRec->getNoWrapFlags();<br>
<br>
If that fixes your case, then the right/safe fix will be trivial.<br></blockquote><div><br></div><div></div></div></div><div class="gmail_extra">It does, on that case. Shouldn't be too hard, but having the right info on the right place could be tricky.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--</div></div>
</div></blockquote>That code is not intending to drop information in your case, but the implementation of the flags is sloppy here. If you can drop a test case in a PR I'll fix it. <div><br></div><div>Andy</div></body></html>