http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59100
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- IIRC we already added another safe rotate form this year based on a report by Niels, you may want to search for that (maybe in the comment before simplify_rotate in tree-ssa-forwprop.c). Basically you are asking to optimize n?rotate(x,n):x to rotate(x,n), makes sense.