[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / mod-peephole.c
blob7517fbc397c9103e3f43e10efe8c173244f5be37
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
4 /* Verify peephole fires to combine div/mod using same opnds. */
6 long foo (long a, long b)
8 long x, y;
10 x = a / b;
11 y = a % b;
12 return (x + y);
15 unsigned long foo2 (unsigned long a, unsigned long b)
17 unsigned long x, y;
19 x = a / b;
20 y = a % b;
21 return (x + y);
24 /* { dg-final { scan-assembler-not {\mmodsd\M} } } */
25 /* { dg-final { scan-assembler-not {\mmodud\M} } } */