<div class="gmail_quote">On Mon, Apr 9, 2012 at 5:46 PM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@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 class="im">> A rebased version is attached.<br>
<br>
</div>And a rebase without the helper function is attached.<br></blockquote><div><br></div><div>Discussed on IRC, but in summary:</div><div><br></div><div>I think the much simpler code is the right approach here. I had hoped for some generalization to emerge, but it's just not there. We really want to detect "trunc to i1" when it is phrased as an icmp. The code does that now.</div>
<div><br></div><div>I've asked for making the ISD::TRUNCATE case a single early-exit block, and comments documinging what all is going on here. With that, LGTM.</div></div>