Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / madd-4.c
blob28c751b40f765ee3eafacd7b2fa2ff29674781af
1 /* { dg-do compile } */
2 /* This test requires widening_mul */
3 /* { dg-options "-mdspr2 -mgp32 -fexpensive-optimizations" } */
4 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
5 /* { dg-final { scan-assembler-times "\tmadd\t\\\$ac" 3 } } */
7 NOMIPS16 long long
8 f1 (int x, int y, long long z)
10 return (long long) x * y + z;
13 NOMIPS16 long long
14 f2 (int x, int y, long long z)
16 return z + (long long) y * x;
19 NOMIPS16 long long
20 f3 (int x, int y, long long z)
22 long long t = (long long) x * y;
23 int temp = 5;
24 if (temp == 5)
25 z += t;
26 return z;