]> git.bitcoin.ninja Git - rust-lightning/commitdiff
with less shuf
authorMatt Corallo <git@bluematt.me>
Sat, 16 Dec 2023 19:06:50 +0000 (19:06 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 17 Jul 2024 14:38:41 +0000 (14:38 +0000)
lightning/src/util/simd_f32.rs

index 68db25af40194e159296406335f8fabebf7b09b6..c7c04baacff93bcce2ff710a051e06210c0f1eb7 100644 (file)
@@ -146,14 +146,10 @@ mod x86_sse {
                        let res_b = _mm256_unpackhi_epi32(lo, zeros);
 
                        let suma = _mm256_add_epi64(res_a, res_b);
-                       let res_a = _mm256_unpacklo_epi64(suma, zeros);
-                       let res_b = _mm256_unpackhi_epi64(suma, zeros);
-
-                       let sumb = _mm256_add_epi64(res_a, res_b);
 
                        let mut res_bytes = AlignedInts([0; 4]);
-                       _mm256_store_si256(&mut res_bytes.0[0] as *mut u64 as *mut __m256i, sumb);
-                       res_bytes.0[0] + res_bytes.0[2]
+                       _mm256_store_si256(&mut res_bytes.0[0] as *mut u64 as *mut __m256i, suma);
+                       res_bytes.0[0] + res_bytes.0[1] + res_bytes.0[2] + res_bytes.0[3]
                }
        }
 }