[PATCH] ValueTracking: Teach isKnownToBeAPowerOfTwo that a power-of-two-or-zero + the same power-of-two-or-zero is a power-of-two-or-zero

David Majnemer david.majnemer at gmail.com
Fri Jul 12 18:07:23 PDT 2013


Attached is a patch to strengthen isKnownToBeAPowerOfTwo's analysis on add
instructions.

It calls into ComputeMaskedBits to figure out which bits are set on both
add operands and determines if the value is a power-of-two-or-zero or not.

-- 
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/f9394079/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uremp2.diff
Type: application/octet-stream
Size: 3220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/f9394079/attachment.obj>


More information about the llvm-commits mailing list