https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111597
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization CC| |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- So it's only because the incoming x is sign-extended to long due to the ABI? Seems to be a quite "localized" issue. Btw, it was ppc folks requesting this pattern as a building block for a larger transform. It's always difficult to use canonicalizations to do simplifications.