commit | 0a83b7badd18430b87467bb46a80bf0641ec433f | [log] [tgz] |
---|---|---|
author | Kaylee Lubick <kjlubick@google.com> | Wed Nov 27 11:50:25 2024 -0500 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Wed Nov 27 18:22:43 2024 +0000 |
tree | 9c318b714e89f67a6ea0d38e2ec8c3785e836cdc | |
parent | b8005bb2078c2fe2b4af0577edbfa952c43b1851 [diff] |
Fix SIMD compilation error for GCC 8.x and below GCC versions older than 9.1 don't have _mm_loadu_si64, but they do have _mm_loadl_epi64 which is equivalent. https://godbolt.org/z/bbfKr44e7 The name of the intrinsic seems to indicate it should be aligned, however the Intel documentation does not specify this [1], GCC removed the alignment assertion from the headers [2], random blogs suggest this [3] and the assembly code generated appears to be the same. While I was in here, I made some alignment checks a bit more readable. [1] https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_loadl_epi64&ig_expand=4044 "Load 64-bit integer from memory into the first element of dst." [2] https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/i386/emmintrin.h;h=d5aa46a16f73bb88e11a6f84c5495c113d86127f;hp=b299cbc8178cbae765b8997b5032fe8e96c07657;hb=865fc9684661c46589a30c6021cf44de560940f3;hpb=846fbd1e2b11a524563058d54f59447620497fde [3] https://fgiesen.wordpress.com/2016/04/03/sse-mind-the-gap/ "...and there is no alignment requirement." Change-Id: Ic6069048c490d7300f34cf8372455cd31d11d891 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/924839 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>