summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/madd-9.c
blob: 6d545495c03cefdf5f59c2bec9e705c436bb527e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "isa_rev>=1 -mgp32" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
/* { dg-final { scan-assembler "\tmadd\t" } } */

NOMIPS16 long long
f1 (int *a, int *b, int n)
{
  long long int x;
  int i;

  x = 0;
  for (i = 0; i < n; i++)
    x += (long long) a[i] * b[i];
  return x;
}