summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/mla-1.c
blob: 669647a55acac3fa46ab852d97ed5a55fb0f0e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-skip-if "" { arm_thumb1 } { "*" } { "" } } */
/* { dg-options "-O2" } */


int
foo (int *p, int *q)
{
  int i;
  int accum = 0;

  for (i = 0 ; i < 1024; i++)
    {
      accum += ((*p--) * (*q++));
      accum += 4096;
      accum >>= 13 ;
    }

  return accum;
}

/* { dg-final { scan-assembler "mla" } } */