https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112385
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We can even do it if we know the unsigned value does not have the last bit set. That is: ``` int f(int a, unsigned b, int c) { b &= 0xffff; return (c >> a) ^ (b >> a); } ``` Note clang(LLVM) does not handle the above. The way LLVM handles the others is it changes ashift to lshift if the value is known to be non-negative. But since in the gimple level we are dealing with types we can't do that in a nice way; RTL level on the other hand yes that can be done (though nonzero bits is limited there).