SH: Fix outage caused by recently added 2nd combine pass after reg alloc
[official-gcc.git] / gcc / testsuite / gcc.target / mips / maddu-4.c
blob58c4a7ebe0c81ca893810e1ccd81f7b57d254ab9
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 "\tmaddu\t\\\$ac" 3 } } */
7 typedef unsigned int ui;
8 typedef unsigned long long ull;
10 NOMIPS16 ull
11 f1 (ui x, ui y, ull z)
13 return (ull) x * y + z;
16 NOMIPS16 ull
17 f2 (ui x, ui y, ull z)
19 return z + (ull) y * x;
22 NOMIPS16 ull
23 f3 (ui x, ui y, ull z)
25 ull t = (ull) x * y;
26 int temp = 5;
27 if (temp == 5)
28 z += t;
29 return z;