http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49411
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-15 06:32:20 UTC --- Created attachment 24533 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24533 gcc47-pr49411.patch Untested fix. Alternatively, we could for the rotation instead just always mask the immediate operand (the only docs I found about these intrinsics was MSFT documentation which didn't say anything on invalid count, but even said that the count is preferrably an integer instead of unconditionally an integer). Therefore, perhaps we could mask it if it is constant and expand using rotl<mode>3 expander if it is not CONST_INT.