<div class="gmail_quote">On Mon, Dec 19, 2011 at 12:07 PM, Evan Cheng <span dir="ltr"><<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div><div class="h5"><div>On Dec 17, 2011, at 2:29 AM, Chandler Carruth wrote:</div><br><blockquote type="cite"><div class="gmail_quote">On Thu, Dec 15, 2011 at 7:52 AM, Stephen Canon <span dir="ltr"><<a href="mailto:scanon@apple.com" target="_blank">scanon@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Just for the record, this is in no way unique to AMD.  Agner Fog's tables list BSF/BSR as 10 µops/16 cycles on Atom as well.  BSF is a hazard to be avoided on an unknown x86 processor.</div>

</div></blockquote><div><br></div><div>I really wasn't trying to draw generalizations. I've read the same tables. =/ I'm not sure what your concerned about here, this patch is orthogonal to any work on avoiding these instructions on architectures where they just decode to silly microcode.</div>

<div><br></div><div>I'd still really appreciate some review on the actual patch. It's pretty simple.</div></div></blockquote><div><br></div></div></div>The patch looks fine to me.</div></div></blockquote><div><br>
</div><div>Thanks!</div><div><br></div><div>Testing a boot-strap uncovered a pretty silly miscompile; I'd not correctly modeled the essentially insane semantics of bsr. The fix was spotted by Benjamin Kramer and he checked my (obvious) fix. I've committed the fixed patch, with improved tests in r146974. I'll watch the bots just in case. </div>
</div>