https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99405
--- Comment #6 from cqwrteur <unlvsur at live dot com> --- (In reply to Jakub Jelinek from comment #5) > The valid C code if it is correct without UB and is pattern matched is > definitely better than some intrinsics, it is portable and can be optimized > generally sooner and better than the intrinsics. > Just be warned that there are many ways how to write not very good rotates, > e.g. (x << y) | (x >> (32 - y)) which has UB for y <= 0 or >= 32 etc. what about addcarry?