Debian Codegraph @

gcc/testsuite/gcc.dg/opt-ordered-and-nonequal-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-forwprop1-details" } */
3 /* Make this work for default 'LOGICAL_OP_NON_SHORT_CIRCUIT == false' configurations:
4 { dg-additional-options "--param logical-op-non-short-circuit=1" } */
5
6 int is_ordered_and_nonequal_sh_1 (float a, float b)
7 {
8 return !__builtin_isunordered (a, b) && (a != b);
9 }
10
11 int is_ordered_and_nonequal_sh_2 (float a, float b)
12 {
13 return !__builtin_isunordered (a, b) && (b != a);
14 }
15
16 int is_ordered_and_nonequal_sh_3 (float a, float b)
17 {
18 return (b != a) && !__builtin_isunordered (a, b);
19 }
20
21 int is_ordered_and_nonequal_sh_4 (float a, float b)
22 {
23 return !__builtin_isunordered (a, b) && !(a == b);
24 }
25
26 int is_ordered_and_nonequal_sh_5 (float a, float b)
27 {
28 return !__builtin_isunordered (a, b) && !(b == a);
29 }
30
31 int is_ordered_and_nonequal_sh_6 (float a, float b)
32 {
33 return !(b == a) && !__builtin_isunordered (a, b);
34 }
35
36 int is_ordered_or_nonequal_sh_7 (float a, float b)
37 {
38 return !(__builtin_isunordered (a, b) || (a == b));
39 }
40
41 int is_ordered_or_nonequal_sh_8 (float a, float b)
42 {
43 return !(__builtin_isunordered (a, b) || (b == a));
44 }
45
46 int is_ordered_or_nonequal_sh_9 (float a, float b)
47 {
48 return !((a == b) || __builtin_isunordered (b, a));
49 }
50
51 /* { dg-final { scan-tree-dump-times "gimple_simplified to\[^\n\r]*<>" 9 "forwprop1" } } */