Commit 8c729fb2 by Uros Bizjak

sse2-mmx.c (unsigned_add3): Use _mm_setzero_si64 to zero carry.

	* gcc.target/i386/sse2-mmx.c (unsigned_add3): Use _mm_setzero_si64
	to zero carry.

From-SVN: r133043
parent fc9161c1
......@@ -23,10 +23,10 @@ unsigned_add3 (const __m64 * a, const __m64 * b,
unsigned int i;
one = _mm_cmpeq_pi8 (_a, _a);
one = _mm_sub_si64 (_mm_xor_si64 (one, one), one);
carry = _mm_setzero_si64 ();
carry = _mm_xor_si64 (one, one);
one = _mm_cmpeq_pi8 (carry, carry);
one = _mm_sub_si64 (carry, one);
for (i = 0; i < count; i++)
{
......@@ -49,7 +49,6 @@ unsigned_add3 (const __m64 * a, const __m64 * b,
carry = _mm_srli_si64 (carry, 63);
}
_mm_empty ();
return carry;
}
......@@ -66,6 +65,8 @@ sse2_test (void)
carry = (unsigned long long) unsigned_add3
((__m64 *)a, (__m64 *)b, (__m64 *)result, N);
_mm_empty ();
if (carry != 1)
abort ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment