As requested, I am posting this patch to gcc-patches. Problem description: The detailed description and examples can be found in pr61662, but in short: using "#ifdef __x86_64__" to determine the size of a 'long' does not reliably yield the correct result. This causes _lrotl and _lrotr to return incorrect results on LLP64 systems (like Windows). ChangeLog: 2014-07-09 David Wohlferd PR target/61662 * config/i386/ia32intrin.h: Use __LP64__ to determine size of long dw