Imported Upstream version 4.7.2
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / mips / madd-9.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 isa_rev>=1 -mgp32" } */
3 /* { dg-final { scan-assembler-not "\tmul\t" } } */
4 /* { dg-final { scan-assembler "\tmadd\t" } } */
5
6 NOMIPS16 long long
7 f1 (int *a, int *b, int n)
8 {
9   long long int x;
10   int i;
11
12   x = 0;
13   for (i = 0; i < n; i++)
14     x += (long long) a[i] * b[i];
15   return x;
16 }