<div dir="ltr">On Wed, Mar 12, 2014 at 9:56 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
> This patch is still powerful enough to optimize the bzip2 benchmark that<br>
> originally motivated this optimization. It's only less powerful in that it<br>
> indicates a range of values instead of just the two discrete values, but it<br>
> seems most existing optimizations just care about the range. If more precise<br>
> information is desired, it would make sense to augment the range metadata to<br>
> be able to provide that. If that is done, then this optimization could<br>
> easily be augmented to support it.<br>
<br>
</div>The range should already support that if need. Only the optimization<br>
would need to up updated to created multiple ranges.<br></blockquote><div><br></div><div>I missed that earlier. Attached is a new patch which implements this, and uses APInts as you suggested.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

One more nit, can you update test/Transforms/GlobalOpt/integer-bool.ll<br>
to also CHECK the range added to the load?<br></blockquote><div><br></div><div>The load in that testcase is eliminated, so I added a new test in which loads aren't eliminated, that tests that they have the range metadata.<br>
</div><div> <br></div><div>Dan<br><br></div></div></div></div>