[llvm-commits] [PATCH] Simplify negated bit test
Jakub Staszak
kubastaszak at gmail.com
Mon Dec 10 13:16:50 PST 2012
On Dec 10, 2012, at 9:58 PM, David Majnemer <david.majnemer at gmail.com> wrote:
>
> 2. It doesn't have to be 1 which is shifted. It works with any power-of-two value (you can use m_Power2 pattern).
> I was under the impression that m_Power2 does not handle values generated from shl instructions.
>
> Further, it seems that LLVM already turns !!(~A & C) into !(A & C) where C is a constant and a power of 2. Should I add such a transform anyway?
>
What I meant was you should m_Power2 the constant value itself. So it should work also with (2 << x), (4 << x), etc.
- Kuba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121210/528c95fc/attachment.html>
More information about the llvm-commits
mailing list