1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-icf" } */
4 /* Should produce <=. */
5 int test1 (int a
, int b
)
7 return (a
< b
|| a
== b
);
10 /* Should produce <=. */
11 int test2 (int a
, int b
)
19 /* Should produce <= (just deleting redundant test). */
20 int test3 (int a
, int b
)
28 /* Should produce <= (operands reversed to test the swap logic). */
29 int test4 (int a
, int b
)
37 /* Should produce constant 0. */
38 int test5 (int a
, int b
)
46 /* { dg-final { scan-tree-dump-times " <= " 4 "optimized" } } */
47 /* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */
48 /* { dg-final { scan-tree-dump-not " < " "optimized" } } */
49 /* { dg-final { scan-tree-dump-not " == " "optimized" } } */