The intrinsics _mm_loadl_epi64 and _mm_storel_epi64 triggers UBSan warnings on unaligned access because the instrinsics definitions in emmintrin.h are using __m64 and __v2di pointers, and both those types have been declared with default alignment. The intrinsics definitions should probably either be replaced with a __builtin_ia32_movq, or the __m64 and __v2di types be defined with __attribute__ ((aligned(1))).
Confirmed on gcc version 6.0.0 20160304
I believe this to be fixed by r239889
Created attachment 40130 [details]
On closer inspection, we are only almost there, two minor changes are still needed. (testing patch).
Created attachment 40140 [details]
Updated patch confirmed to work
Date: Sun Dec 11 16:27:08 2016
New Revision: 243527
* config/i386/mmintrin.h (__m64_u): New type
* config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64):
Make the allowed unaligned memory access explicit.
Fixed in trunk