From 6c1d763119513b9ed64c20c41db7f7a47e71c3d0 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Fri, 15 Jan 2016 23:52:29 -0800 Subject: [PATCH] avoid Yoda style for comparison Change-Id: I8ff9f96951e5e8a619f7132455dd281cbf91aa4d --- src/dsp/lossless_enc_sse2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dsp/lossless_enc_sse2.c b/src/dsp/lossless_enc_sse2.c index 9ff36997..7c894e7c 100644 --- a/src/dsp/lossless_enc_sse2.c +++ b/src/dsp/lossless_enc_sse2.c @@ -330,7 +330,7 @@ static int VectorMismatch(const uint32_t* const array1, const uint32_t* const array2, int length) { int match_len; - if (12 <= length) { + if (length >= 12) { __m128i A0 = _mm_loadu_si128((const __m128i*)&array1[0]); __m128i A1 = _mm_loadu_si128((const __m128i*)&array2[0]); match_len = 0; @@ -356,12 +356,12 @@ static int VectorMismatch(const uint32_t* const array1, } else { match_len = 0; // Unroll the potential first two loops. - if (4 <= length && + if (length >= 4 && _mm_movemask_epi8(_mm_cmpeq_epi32( _mm_loadu_si128((const __m128i*)&array1[0]), _mm_loadu_si128((const __m128i*)&array2[0]))) == 0xffff) { match_len = 4; - if (8 <= length && + if (length >= 8 && _mm_movemask_epi8(_mm_cmpeq_epi32( _mm_loadu_si128((const __m128i*)&array1[4]), _mm_loadu_si128((const __m128i*)&array2[4]))) == 0xffff)