<div dir="ltr">+llvmdev</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 11:44 AM, Jingyue Wu <span dir="ltr"><<a href="mailto:jingyue@google.com" target="_blank">jingyue@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Andrew and Sanjoy, </div><div><br></div>I was looking at ScalarEvolution::createNodeForGEP (<a href="http://llvm.org/docs/doxygen/html/ScalarEvolution_8cpp_source.html#l03702" target="_blank">http://llvm.org/docs/doxygen/html/ScalarEvolution_8cpp_source.html#l03702</a>), and noticed that the code that applies nsw flags to the resultant SCEV is inconsistent with the comment. <br><div><br></div><div>While the comment says</div><br>03709   // Don't blindly transfer the inbounds flag from the GEP instruction to the<br>03710   // Add expression, because the Instruction may be guarded by control flow<br>03711   // and the no-overflow bits may not be valid for the expression in any<br>03712   // context.<br>03713   SCEV::NoWrapFlags Wrap = GEP->isInBounds() ? SCEV::FlagNSW : SCEV::FlagAnyWrap;<div><br></div><div>the code still transfers nsw to LocalOffset and BaseS+TotalOffset. Should the code then be fixed?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jingyue</div></font></span></div>
</blockquote></div><br></div>