2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / div-13.c
blobcf746a66306babd48741903289843a700c7bb12a
1 /* { dg-options "(-mips16) -mgp64" } */
2 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4 typedef int int32_t;
5 typedef unsigned int uint32_t;
6 typedef long long int64_t;
7 typedef unsigned long long uint64_t;
9 MIPS16 int32_t f1 (int32_t x, int32_t y) { return x / y + x % y; }
10 MIPS16 uint32_t f2 (uint32_t x, uint32_t y) { return x / y + x % y; }
11 MIPS16 int64_t f3 (int64_t x, int64_t y) { return x / y + x % y; }
12 MIPS16 uint64_t f4 (uint64_t x, uint64_t y) { return x / y + x % y; }
14 /* { dg-final { scan-assembler-times "\tdiv\t" 1 } } */
15 /* { dg-final { scan-assembler-times "\tdivu\t" 1 } } */
16 /* { dg-final { scan-assembler-times "\tddiv\t" 1 } } */
17 /* { dg-final { scan-assembler-times "\tddivu\t" 1 } } */