https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84660
--- Comment #5 from Jim Wilson <wilson at gcc dot gnu.org> --- This is what the original patch I wrote looked like. But then I tried to optimize it a bit to eliminate the redundant nonzero_bits call, and that is where I screwed up. Then I got overwhelmed by work and haven't had a chance to get back to it yet. I can't self approve patches to combine, so it needs to be submitted to gcc-patches for review. It probably should be tested on at least one other target that isn't SHIFT_COUNT_TRUNCATED.