aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/wmul-4.c
blob: 68f9866746da7c1cf34b79d800b9969c9f48bf2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */
/* { dg-options "-O1 -fexpensive-optimizations" } */

int mac(const int *a, const int *b, long long sqr, long long *sum)
{
  int i;
  long long dotp = *sum;

  for (i = 0; i < 150; i++) {
    dotp += (long long) b[i] * a[i];
    sqr += (long long) b[i] * b[i];
  }

  *sum = dotp;
  return sqr;
}

/* { dg-final { scan-assembler-times "smlal" 2 } } */