<div>The initial inspiration for my local mod was to create a way for our optimizer to get at ISD::ROTL directly. This would allow us to always produce an x86 rol instruction for a user intrinsic call, even at -O0.</div><div>
<br></div><div>I suppose an LLVM intrinsic would do the same thing. But, it is nice to have an operator so LLVM can optimize common cases, like cshift by a constant. I personally feel that it fits in with LSHL, LSHR, and ASHR.</div>
<div><br></div><div>That being said, I'd be just as happy with any other way to convey the same functionality. It just seems less nice to have to unfold a circular shift intrinsic into the Hacker's Delight algorithm (5 or more operations) at our opt/LLVM interface, just to have LLVM try to put it back together.</div>
<div><br></div><div><div class="gmail_quote">On Tue, Jul 31, 2012 at 1:58 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:</div><div class="gmail_quote">
...<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Why do we need a new builtin for rotates? What problem does it solve?<font class="Apple-style-span" color="#888888"><br></font></blockquote></div></div>