]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
remove only use of cmpmsk8 and unused cmpmsk16
authorMatthew Barr <matthew.barr@intel.com>
Tue, 14 Jun 2016 01:21:48 +0000 (11:21 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 8 Jul 2016 01:07:50 +0000 (11:07 +1000)
src/nfa/limex_shuffle.h
src/util/simd_utils.h

index 40900a65de863dbdfcf94cb60e39aed2393689af..e45e4331f21b13cee45eabac7926d9b4c8920ad9 100644 (file)
@@ -91,7 +91,7 @@ static really_inline
 u32 packedExtract128(m128 s, const m128 permute, const m128 compare) {
     m128 shuffled = pshufb(s, permute);
     m128 compared = and128(shuffled, compare);
-    u16 rv = ~cmpmsk8(compared, shuffled);
+    u16 rv = ~movemask128(eq128(compared, shuffled));
     return (u32)rv;
 }
 
index 90a8aba4c926341c890c2f3d5b705b868ee7f181..107b22afc92396e274e6d43693b38f36afc72526 100644 (file)
@@ -152,12 +152,6 @@ static really_inline u32 diffrich64_128(m128 a, m128 b) {
 // forward decl
 static really_inline m128 xor128(m128 a, m128 b);
 
-/** \brief Return msb mask of packet 8 bit compare equal */
-static really_inline unsigned short cmpmsk8(m128 a, m128 b) {
-    m128 tmp = _mm_cmpeq_epi8(a, b);
-    return _mm_movemask_epi8(tmp);
-}
-
 #define shift2x64(a, b)  _mm_slli_epi64((a), (b))
 #define rshift2x64(a, b) _mm_srli_epi64((a), (b))
 #define eq128(a, b)      _mm_cmpeq_epi8((a), (b))
@@ -355,10 +349,6 @@ m256 set32x8(u32 in) {
 #define eq256(a, b)     _mm256_cmpeq_epi8((a), (b))
 #define movemask256(a)  ((u32)_mm256_movemask_epi8((a)))
 
-static really_inline u32 cmpmsk16(m256 a, m256 b) {
-    m256 tmp = _mm256_cmpeq_epi8(a, b);
-    return _mm256_movemask_epi8(tmp);
-}
 static really_inline
 m256 set2x128(m128 a) {
     return _mm256_broadcastsi128_si256(a);