]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
teddy: we only need the upper lane
authorMatthew Barr <matthew.barr@intel.com>
Tue, 7 Jun 2016 05:44:39 +0000 (15:44 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 8 Jul 2016 01:07:50 +0000 (11:07 +1000)
Just use an extract, no need to shuffle first.

src/fdr/teddy_avx2.c

index f282c50553ed63c628685150cfb16b56c6ffc008..ef06813c29192a4de3e470b01470164d2df5e452 100644 (file)
@@ -204,7 +204,7 @@ do {                                                                        \
     if (unlikely(isnonzero256(var))) {                                      \
         u32 arrCnt = 0;                                                     \
         m128 lo = cast256to128(var);                                        \
-        m128 hi = cast256to128(swap128in256(var));                          \
+        m128 hi = movdq_hi(var);                                            \
         bit_array_fast_teddy(lo, bitArr, &arrCnt, offset);                  \
         bit_array_fast_teddy(hi, bitArr, &arrCnt, offset + 2);              \
         for (u32 i = 0; i < arrCnt; i++) {                                  \