1 /* Check that inverted conditional branch logic does not generate
2 unnecessary explicit T bit extractions, inversions and
4 /* { dg-do compile } */
5 /* { dg-options "-O1 -mbranch-cost=2" } */
6 /* { dg-final { scan-assembler-not "movt|tst|negc|extu" } } */
9 testfunc_00 (int a
, int b
, int c
, int d
)
11 return (a
!= b
|| a
!= d
) ? b
: c
;
15 testfunc_01 (int a
, int b
, int c
, int d
)
17 return (a
== b
|| a
== d
) ? b
: c
;
21 testfunc_02 (int a
, int b
, int c
, int d
)
23 return (a
== b
&& a
== d
) ? b
: c
;
27 testfunc_03 (int a
, int b
, int c
, int d
)
29 return (a
!= b
&& a
!= d
) ? b
: c
;