<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 10, 2012, at 9:58 PM, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
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).<br></blockquote><p class="">I was under the impression that m_Power2 does not handle values generated from shl instructions.</p>
<div>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?</div><div> </div></div></div></blockquote><br></div><div>What I meant was you should m_Power2 the constant value itself. So it should work also with (2 << x), (4 << x), etc.</div><div><br></div><div>- Kuba</div></body></html>