From: Matthew Barr Date: Thu, 21 Apr 2016 05:50:01 +0000 (+1000) Subject: noodle: remove redundant bitmask X-Git-Tag: v4.2.0^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c0fb7e0e91ecd8b7db9ea5267b363874436e8a;p=thirdparty%2Fvectorscan.git noodle: remove redundant bitmask --- diff --git a/src/hwlm/noodle_engine_avx2.c b/src/hwlm/noodle_engine_avx2.c index 093501cb..14d0eab5 100644 --- a/src/hwlm/noodle_engine_avx2.c +++ b/src/hwlm/noodle_engine_avx2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2016, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -221,7 +221,7 @@ hwlm_error_t scanDoubleFast(const u8 *buf, size_t len, const u8 *key, u32 z0 = movemask256(eq256(mask1, v)); u32 z1 = movemask256(eq256(mask2, v)); u32 z = (lastz0 | (z0 << 1)) & z1; - lastz0 = (z0 & 0x80000000) >> 31; + lastz0 = z0 >> 31; // On large packet buffers, this prefetch appears to get us about 2%. __builtin_prefetch(d + 128);