[llvm-commits] [PATCH] Rotate constant folding bug
Cameron McInally
cameron.mcinally at nyu.edu
Thu Oct 13 15:59:04 PDT 2011
Second attempt...
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.
Thanks again,
Cameron
On Thu, Oct 13, 2011 at 5:47 PM, Cameron McInally
<cameron.mcinally at nyu.edu>wrote:
>
>> > const APInt two(1, 2);
>>
>> 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.
>>
>
> Whoops... TEST(APIntTest, i1) => int*1. Nevermind, I just got it. It's the
> first time I'm looking at the unit tests.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111013/808810ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotate_patch
Type: application/octet-stream
Size: 2505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111013/808810ab/attachment.obj>
More information about the llvm-commits
mailing list