https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126671

Vincenzo Romano <vincenzo.romano at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincenzo.romano at gmail dot 
com

--- Comment #1 from Vincenzo Romano <vincenzo.romano at gmail dot com> ---
This is confirmed for current trunk with "-march=rv64gcb_zbkb -mabi=lp64":
__builtin_bitreverse64() does not emit the expected sequence:

    rev8 a0, a0
    brev8 a0, a0


but rather the usual 20+ instruction bit swapping sequence.

CLANG does it correctly since v19.1.0

It can be seen in action here:

https://godbolt.org/z/67z4cKnzn

Reply via email to