2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr51244-1.c
blob1da824de1fb618830933b7636d0414a706993411
1 /* Check that inverted conditional branch logic does not generate
2 unnecessary explicit T bit extractions, inversions and
3 test instructions. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1 -mbranch-cost=2" } */
6 /* { dg-final { scan-assembler-not "movt|tst|negc|extu" } } */
8 int
9 testfunc_00 (int a, int b, int c, int d)
11 return (a != b || a != d) ? b : c;
14 int
15 testfunc_01 (int a, int b, int c, int d)
17 return (a == b || a == d) ? b : c;
20 int
21 testfunc_02 (int a, int b, int c, int d)
23 return (a == b && a == d) ? b : c;
26 int
27 testfunc_03 (int a, int b, int c, int d)
29 return (a != b && a != d) ? b : c;