(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
ssa-thread-14.c
       1  /* { dg-do compile } */
       2  /* { dg-additional-options "-O2 --param logical-op-non-short-circuit=1 -fdump-tree-threadfull1-details" }  */
       3  /* { dg-final { scan-tree-dump-times "Registering jump thread" 8 "threadfull1" } }  */
       4  
       5  void foo (void);
       6  void bar (void);
       7  void blah (void);
       8  
       9  /* One jump threaded here.  */
      10  
      11  void
      12  baz_1 (int a, int b, int c)
      13  {
      14    if (a && b)
      15      foo ();
      16    if (!b && c)
      17      bar ();
      18  }
      19  
      20  /* One jump threaded here.  */
      21  
      22  void
      23  baz_2 (int a, int b, int c)
      24  {
      25    if (a && b)
      26      foo ();
      27    if (b || c)
      28      bar ();
      29  }
      30  
      31  /* One jump threaded here.  */
      32  
      33  void
      34  baz_3 (int a, int b, int c)
      35  {
      36    if (a && b > 10)
      37      foo ();
      38    if (b < 5 && c)
      39      bar ();
      40  }
      41  
      42  /* Two jumps threaded here.  */
      43  
      44  void
      45  baz_4 (int a, int b, int c)
      46  {
      47    if (a && b)
      48      {
      49        foo ();
      50        if (c)
      51          bar ();
      52      }
      53    if (b && c)
      54      blah ();
      55  }
      56  
      57  /* Two jumps threaded here.  */
      58  
      59  void
      60  baz_5 (int a, int b, int c)
      61  {
      62    if (a && b)
      63      {
      64        foo ();
      65        if (c)
      66          bar ();
      67      }
      68    if (!b || !c)
      69      blah ();
      70  }
      71  
      72  /* One jump threaded here.  */
      73  
      74  void
      75  baz_6 (int a, int b, int c)
      76  {
      77    if (a == 39 && b == 41)
      78      foo ();
      79    if (c == 12 || b == 41)
      80      bar ();
      81  }