https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121778
Dusan Stojkovic <dusan.stojko...@rt-rk.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dusan.stojko...@rt-rk.com --- Comment #1 from Dusan Stojkovic <dusan.stojko...@rt-rk.com> --- GCC could generate the following assembly for test_011: test_011: roriw a0, a0, 31 xori a0, a0, 1 ret Since the bitmanip spec doesn't offer a rotate left immediate, a rotate right immediate can be used instead. I tested this version against the current GCC trunk, and they produce the same values for all unsigned ints. Compiled with -march=rv64gcvb_zicond -O2 -mabi=lp64d