Hello! The testcase checks if the compiler is able to vectorize with psadbw insn on x86 targets.
2018-05-08 Uros Bizjak <ubiz...@gmail.com> PR target/85693 * gcc.target/i386/pr85693.c: New test. Tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros.
Index: gcc.target/i386/pr85693.c =================================================================== --- gcc.target/i386/pr85693.c (nonexistent) +++ gcc.target/i386/pr85693.c (working copy) @@ -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" } } */