(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
pr96685-1.c
       1  /* PR tree-optimization/96685 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -fdump-tree-optimized" } */
       4  /* { dg-final { scan-tree-dump-times "return 1;" 6 "optimized" } } */
       5  
       6  unsigned
       7  f1 (unsigned x, unsigned y)
       8  {
       9    unsigned a = ~(x - y);
      10    unsigned b = ~x + y;
      11    return a == b;
      12  }
      13  
      14  unsigned
      15  f2 (unsigned x)
      16  {
      17    unsigned a = ~(x + -124U);
      18    unsigned b = ~x + 124U;
      19    return a == b;
      20  }
      21  
      22  unsigned
      23  f3 (unsigned x)
      24  {
      25    unsigned a = ~(x + 124U);
      26    unsigned b = ~x + -124U;
      27    return a == b;
      28  }
      29  
      30  int
      31  f4 (int x, int y)
      32  {
      33    int a = ~(x - y);
      34    int b = ~x + y;
      35    return a == b;
      36  }
      37  
      38  int
      39  f5 (int x)
      40  {
      41    int a = ~(x + -124);
      42    int b = ~x + 124;
      43    return a == b;
      44  }
      45  
      46  int
      47  f6 (int x)
      48  {
      49    int a = ~(x + 124);
      50    int b = ~x + -124;
      51    return a == b;
      52  }