2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr52933-2.c
blob2b5d09ad0bb74ad27197f8374edc975a84e3084c
1 /* Check that the div0s instruction is used for integer sign comparisons
2 when -mpretend-cmove is enabled.
3 Each test case is expected to emit at least one div0s insn.
4 Problems when combining the div0s comparison result with surrounding
5 logic usually show up as redundant tst insns. */
6 /* { dg-do compile } */
7 /* { dg-options "-O2 -mpretend-cmove" } */
8 /* { dg-final { scan-assembler-times "div0s" 42 } } */
9 /* { dg-final { scan-assembler-not "tst" } } */
10 /* { dg-final { scan-assembler-not "not\t" } } */
11 /* { dg-final { scan-assembler-not "nott" } } */
13 /* { dg-final { scan-assembler-times "negc" 10 { target { ! sh2a } } } } */
14 /* { dg-final { scan-assembler-times "movrt" 10 { target { sh2a } } } } */
16 #include "pr52933-1.c"