]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Update zstd_lazy.c
authorTrianglesPCT <dain.bray@gmail.com>
Fri, 14 May 2021 23:03:30 +0000 (17:03 -0600)
committerGitHub <noreply@github.com>
Fri, 14 May 2021 23:03:30 +0000 (17:03 -0600)
switch to unaligned load as I don't know if buffer will always be aligned to 32 bytes, and compilers aside from MSVC might actually use aligned loads

lib/compress/zstd_lazy.c

index bccf2cc11ef9067ba9b8b520ba9ac68334a0eb11..008b0a6b4035aba640b5ff2f86920078c1e0ec0b 100644 (file)
@@ -928,7 +928,7 @@ typedef struct {
 
 static ZSTD_Vec256 ZSTD_Vec256_read(const void* const ptr) {
        ZSTD_Vec256 v;
-    v.v = _mm256_load_si256((const __m256i*)ptr);
+    v.v = _mm256_loadu_si256((const __m256i*)ptr);
        return v;
 }