<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 17, 2017 at 10:22 AM, Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@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 dir="ltr"><div>Today, InstSimplify calls computeKnownBits to try to fold to a constant ONLY if it can't find any other simplifications for an instruction.</div><div><br></div><div>I think this means if we are able to find an earlier simplification we are LESS aggressive about creating a constant because we won't even look at known bits.</div></div></blockquote><div><br></div><div>Not necessarily.</div><div>It may create more or less constants right now, not just strictly less.</div><div>InstSimplify is not complete in it's transformations, so in some cases, the symbolic form is going to result in more simplified operations than the non-symbolic form.</div><div><br></div><div>Now, how often does this happen?</div><div>Again, hard to say. I would guess infrequently :)</div><div>But it's definitely the case that because it is not complete, it is not a 100% improvement all the time to try to make as many constants as possible.</div><div>If it *was* complete, there would be for sure.</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 dir="ltr"><div> This seems surprising to me.</div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Should we be looking at known bits always, or should we remove this save the compile time? How often does this allow us to simplify to a constant?<br></div></div></blockquote><div> </div><div>It may be cheaper, compile time wise , to compute known bits non-lazily and look at it always than trying to  use it always.</div><div>As for how often it allows us to simplify to a constant, dunno, we should just track it.</div><div>Add a statistic, see how it does :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="HOEnZb"><font color="#888888"><div><br></div><div>~Craig<br></div>
</font></span></div>
</blockquote></div><br></div></div>