2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / madd-1.c
blob416673b46d7922df9b9b349920e33047c103cd42
1 /* { dg-do compile } */
2 /* This test requires widening_mul */
3 /* { dg-options "-march=vr4130 -mgp32 -fexpensive-optimizations" } */
4 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
5 /* { dg-final { scan-assembler-times "\tmacc\t\\\$1," 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;