Second attempt...<div><br></div><div>There's not much prior art here, so I'm winging it. Please find my patch and test case attached. It's possible to optimize the '1' and '16' values out, but I thought that was overkill.</div>
<div><br></div><div>Thanks again,</div><div>Cameron<br><br><div class="gmail_quote">On Thu, Oct 13, 2011 at 5:47 PM, Cameron McInally <span dir="ltr"><<a href="mailto:cameron.mcinally@nyu.edu">cameron.mcinally@nyu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>> const APInt two(1, 2);</div><div><br></div><div>If I'm not mistaken, that's one bit representing the unsigned value '2'. So, effectively, that APInt is a '0'. Unless this was done deliberately (which is why I'm asking), I believe the unit tests following this definition are not doing what they are supposed to do.</div>

</blockquote><div><br></div></div><div>Whoops... TEST(APIntTest, i1) => int*1. Nevermind, I just got it. It's the first time I'm looking at the unit tests. </div></div>
</blockquote></div><br></div>