+2017-05-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr22152.c: Fix undefined testcase. Remove
+ unnecessary loop. Run on 32-bit targets only.
+ (dg-options): Remove -fno-tree-sink.
+
2017-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/cmpb-1.c: New test.
-/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-sink -msse2 -mtune=core2" } */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -msse2 -mtune=core2" } */
/* { dg-additional-options "-mno-vect8-ret-in-mem" { target *-*-vxworks* } } */
/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */
#include <mmintrin.h>
+typedef __SIZE_TYPE__ size_t;
+
__m64
-unsigned_add3 (const __m64 * a, const __m64 * b, unsigned int count)
+unsigned_add3 (const __m64 * a, const __m64 * b, size_t count)
{
- __m64 sum;
- unsigned int i;
+ __m64 sum = { 0, 0 };
- for (i = 1; i < count; i++)
- sum = _mm_add_si64 (a[i], b[i]);
+ if (count > 0)
+ sum = _mm_add_si64 (a[count-1], b[count-1]);
return sum;
}