https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50481
--- Comment #41 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Though bitreverse itself needs all bits, it is just the sequence of bitreverse + right shift with the needed shift count that doesn't. Though it is true that it is the case on all arches, so if it could be done in ext_dce or somewhere else generically, then it doesn't need to be peephole2 handled on various arches. Note, bswap actually has a similar behavior, except that it doesn't exist for QImode and for HImode it is usually just a rotate, so most targets don't expand it as bswapsi >> 16. So only relevant for targets which only have bswapdi and not bswapsi...
