[llvm-dev] rol/ror IR support question

James Molloy via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 19 02:58:54 PST 2015


Hi Aleksey,

Rotations are not first-level constructs in the IR, but they can be
expressed as a combination of shifts, ands and ors.

The general principle in LLVM is to have a simple basic set of instructions
that can be combined to produce higher level functions; in the case of
rotate, there are several places in LLVM that detect rotation idioms and
optimize them, and they will be selected correctly in the backend to
optimized instructions if they are available in the target architecture.

Cheers,

James

On Thu, 19 Nov 2015 at 09:13 Aliaksei Zasenka via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi all,
>
> Is it planned to add support of rotations to IR?
>
>
> Thanks,
> Aleksey Zasenko
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151119/eed755ed/attachment.html>


More information about the llvm-dev mailing list