[llvm-commits] [llvm] r159082 - /llvm/trunk/lib/Target/README.txt

Jay Foad jay.foad at gmail.com
Tue Jul 3 07:16:08 PDT 2012


On 24 June 2012 03:36, Nick Lewycky <nicholas at mxc.ca> wrote:
> Duncan Sands wrote:
>> Hi Benjamin,
>>
>>   >  +unsigned f(unsigned x) { return ((x&  7) + 1)&  15; }
>>> +The&  15 part should be optimized away, it doesn't change the result. Currently
>>> +not optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
>>
>> this is probably due to ComputeMaskedBits's "add" logic being pretty weak.  It
>> could easily be made essentially perfect.
>
> GCC's version of ComputeMaskedBits gets perfect results for "add". I
> would ask that you add matching logic for SimplifyDemandedBits when you
> add this, and that isn't quite possible in constant time like it is for
> computing masked bits as it requires bitwise-reversing the bits of the
> operands.
>
> I think Richard has a patch for this. Richard?

Nick,

You had a patch for the ComputeMaskedBits part of this:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110711/123989.html

Did it stall just because we never worked out the matching logic for
SimplifyDemandedBits?

Thanks,
Jay.



More information about the llvm-commits mailing list