[LLVMdev] rotate

Cameron McInally cameron.mcinally at nyu.edu
Tue Jul 31 11:39:43 PDT 2012


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.

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.

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.

On Tue, Jul 31, 2012 at 1:58 PM, Chris Lattner <clattner at apple.com> wrote:
...
>
>
> Why do we need a new builtin for rotates?  What problem does it solve?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120731/b23e66f5/attachment.html>


More information about the llvm-dev mailing list