2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / wmul-4.c
blob68f9866746da7c1cf34b79d800b9969c9f48bf2b
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_dsp } */
3 /* { dg-options "-O1 -fexpensive-optimizations" } */
5 int mac(const int *a, const int *b, long long sqr, long long *sum)
7 int i;
8 long long dotp = *sum;
10 for (i = 0; i < 150; i++) {
11 dotp += (long long) b[i] * a[i];
12 sqr += (long long) b[i] * b[i];
15 *sum = dotp;
16 return sqr;
19 /* { dg-final { scan-assembler-times "smlal" 2 } } */