(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr108582-1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O3 -fno-tree-ccp -fno-tree-dce" } */
       3  
       4  /*
       5    PHI-OPT via match_simplify_replacement used to transform:
       6    if (_25 != 0)
       7      goto <bb 8>; [25.00%]
       8    else
       9      goto <bb 9>; [75.00%]
      10  
      11    <bb 8> [local count: 11649864]:
      12    # iftmp.5_13 = PHI <2(7)>
      13    k_22 = k_11 | iftmp.5_13;
      14  
      15    <bb 9> [local count: 105655256]:
      16    # g_9 = PHI <1(2), 0(8), g_8(7)>
      17    # k_12 = PHI <k_20(D)(2), k_22(8), k_11(7)>
      18  
      19  into:
      20  
      21    _15 = (int) _25;
      22    _28 = -_15;
      23    _4 = _13 & _28;
      24    _6 = _4 | k_11;
      25  
      26    <bb 8> [local count: 105655256]:
      27    # g_9 = PHI <1(2), g_8(7)>
      28    # k_12 = PHI <k_20(D)(2), _6(7)>
      29  
      30  Removing the phi-node/assignment of _13.
      31  
      32   */
      33  
      34  int a, c, d, e, f;
      35  char b;
      36  int main() {
      37    int g = 1;
      38    char h[1] = {0};
      39    while (a) {
      40      if (f) {
      41        b = 0;
      42        if (d)
      43          continue;
      44      }
      45      if (a < 1) {
      46        g = 0;
      47        goto L;
      48      }
      49    }
      50    while (c) {
      51      char *j = h;
      52      int k;
      53    L:
      54      if (e && !g)
      55        k |= 2 | (*j < 0);
      56    }
      57    return 0;
      58  }