1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1-details -fdump-tree-dom2-details -std=gnu89 --param logical-op-non-short-circuit=0" } */
3 
4 #include "ssa-dom-thread-4.c"
5 
6 /* On targets that define LOGICAL_OP_NON_SHORT_CIRCUIT to 0, we split both
7    "a_elt || b_elt" and "b_elt && kill_elt" into two conditions each,
8    rather than using "(var1 != 0) op (var2 != 0)".  Also, as on other targets,
9    we duplicate the header of the inner "while" loop.  There are then
10    4 threading opportunities:
11 
12    1x "!a_elt && b_elt" in the outer "while" loop
13       -> the start of the inner "while" loop,
14 	 skipping the known-true "b_elt" in the first condition.
15    1x "!b_elt" in the first condition
16       -> the outer "while" loop's continuation point,
17 	 skipping the known-false "b_elt" in the second condition.
18    2x "kill_elt->indx >= b_elt->indx" in the first "while" loop
19       -> "kill_elt->indx == b_elt->indx" in the second condition,
20 	 skipping the known-true "b_elt && kill_elt" in the second
21 	 condition.
22 
23    All the cases are picked up by VRP1 as jump threads.  */
24 /* { dg-final { scan-tree-dump-times "Threaded" 4 "vrp1" } } */
25