[llvm-dev] Extra Bit Manipulation intrinsics?

Sanjay Patel via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 6 06:13:50 PST 2018


Rotates are a special case of the recently added funnel shift ops:
http://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic

We don't canonicalize standard IR (shifts and bitwise logic) to the
intrinsics yet, but that is the intent.

There are also clang builtins for rotate left/right that map to the funnel
shift intrinsics:
https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions


On Mon, Nov 5, 2018 at 9:25 PM Braden Nelson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Would it be worth it to add intrinsics for bitfield extract/deposit and
> binary rotate left/right?
> Both of these have dedicated instructions in multiple ISAs, including the
> two major ISAs (x86-64 and ARM)
> Adding them could decrease load on the backend to recognize common
> intrinsic patterns that correspond to these instructions, but could
> increase load on backends that do not have dedicated instructions for these
> intrinsics.
> _______________________________________________
> 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/20181106/352faf77/attachment.html>


More information about the llvm-dev mailing list