1 /* Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 leads to two conditional jumps
2 when evaluating an && condition. VRP is not able to optimize this. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -fdump-tree-forwprop1-details --param logical-op-non-short-circuit=1" } */
6 extern char *frob (void);
7 extern _Bool
testit (void);
8 extern void oof (void);
14 int rotate
= (code
== 22);
15 if (temp
== 0 && !rotate
)
23 int rotate
= (code
== 22);
24 if (!rotate
&& temp
== 0)
32 int rotate
= (code
== 22);
33 if (!rotate
|| temp
== 0)
41 int rotate
= (code
== 22);
42 if (temp
== 0 || !rotate
)
49 _Bool temp
= testit ();
50 _Bool rotate
= (code
== 22);
51 if (temp
== 0 && !rotate
)
58 _Bool temp
= testit ();
59 _Bool rotate
= (code
== 22);
60 if (!rotate
&& temp
== 0)
67 _Bool temp
= testit ();
68 _Bool rotate
= (code
== 22);
69 if (!rotate
|| temp
== 0)
76 _Bool temp
= testit ();
77 _Bool rotate
= (code
== 22);
78 if (temp
== 0 || !rotate
)
82 /* ??? This used to check for 8 times transforming the combined conditional
83 to a ordered compare. But the transform does not trigger if we transform
84 the negated code == 22 compare to code != 22 first. It turns out if
85 we do that we even generate better code on x86 at least. */
86 /* ??? As PR71762 notices this transform causes wrong-code issues in RTL
87 with one uninitialized operand, thus it has been disabled. */
89 /* { dg-final { scan-tree-dump-times "simplified to if \\\(\[^ ]* \[<>\]" 4 "forwprop1" { xfail *-*-* } } } */