re PR tree-optimization/85693 (Generation of SAD (Sum of Absolute Difference) instruction)

PR target/85693
	* gcc.target/i386/pr85693.c: New test.

From-SVN: r260047
This commit is contained in:
Uros Bizjak 2018-05-08 18:48:43 +02:00 committed by Uros Bizjak
parent ec332f1b44
commit 49c0e806ac
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2018-05-08 Uros Bizjak <ubizjak@gmail.com>
PR target/85693
* gcc.target/i386/pr85693.c: New test.
2018-05-08 Jakub Jelinek <jakub@redhat.com> 2018-05-08 Jakub Jelinek <jakub@redhat.com>
PR target/85683 PR target/85683

View File

@ -0,0 +1,21 @@
/* { dg-do compile }
/* { dg-options "-msse2 -O2 -ftree-vectorize" } */
#define N 1024
int abs (int);
unsigned char pix1[N], pix2[N];
int foo (void)
{
int i_sum = 0;
int i;
for (i = 0; i < N; i++)
i_sum += abs (pix1[i] - pix2[i]);
return i_sum;
}
/* { dg-final { scan-assembler "psadbw" } } */