<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 24, 2016, at 6:41 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com" class="">eli.friedman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, May 24, 2016 at 6:24 PM, Michael Zolotukhin <span dir="ltr" class=""><<a href="mailto:mzolotukhin@apple.com" target="_blank" class="">mzolotukhin@apple.com</a>></span> wrote:<span class=""></span><br class=""><span class=""></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><span class=""><br class=""></span>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""></span><div class=""><div class="">When asked for a value at some iteration, SCEV considers ‘null' as 0 and returns, for instance, ‘i32 24’. I’m not sure if it’s incorrect, that’s why I fixed it in this spot.</div></div></blockquote><div class=""><br class=""></div><div class="">Maybe you could construct an inttoptr constant expression in <span class="">UnrolledInstAnalyzer</span><span class="">::</span><span class="">simplifyInstWithSCEV</span><span class=""> instead of trying to recover later?<br class=""></span></div></div></div></div></div></blockquote></span>That would require adding a special case handling to simplifyInstWithSCEV, which I prefer to avoid. Currently we don’t look at what type of instruction we’re analyzing at all - we completely rely on SCEV there.<div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Okay.  It would be nice to document somewhere in the source code, since it's a hazard for anyone updating the code.  Also, there's a missing check for the type of the constants in <span class=""></span><span class="">visitCmpInst</span><span class="">.</span><br class=""></div></div></div></div></div></blockquote>Thanks, I’ll follow up on this!</div><div><br class=""></div><div>Michael<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><span class=""></span></div></div><span class=""><br class=""></span></div><div class="gmail_extra"><span class="">-Eli<br class=""></span></div></div>
</div></blockquote></div><br class=""></body></html>