[llvm] r182200 - isKnownToBeAPowerOfTwo: (X & Y) + Y is a power of 2 or zero if y is also.

Duncan Sands duncan.sands at gmail.com
Sat May 18 13:13:34 PDT 2013


Hi David,

On 18/05/13 21:30, David Majnemer wrote:
> Author: majnemer
> Date: Sat May 18 14:30:37 2013
> New Revision: 182200
>
> URL: http://llvm.org/viewvc/llvm-project?rev=182200&view=rev
> Log:
> isKnownToBeAPowerOfTwo: (X & Y) + Y is a power of 2 or zero if y is also.

if the + is nsw or nuw then the sum can't be zero.  I don't know if this is
useful in practice.

Ciao, Duncan.



More information about the llvm-commits mailing list