(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
pr94882-3.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-optimized" } */
       3  /* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) & y_\[0-9]+\\\(D\\\);" "optimized" } } */
       4  /* { dg-final { scan-tree-dump-not "x_\[0-9]+\\\(D\\\) \\| y_\[0-9]+\\\(D\\\);" "optimized" } } */
       5  /* { dg-final { scan-tree-dump-times "x_\[0-9]+\\\(D\\\) \\^ y_\[0-9]+\\\(D\\\);" 4 "optimized" } } */
       6  /* { dg-final { scan-tree-dump-times "_\[0-9] \\^ _\[0-9]" 4 "optimized" } } */
       7  /* { dg-final { scan-tree-dump-times "~_\[0-9]\+" 8 "optimized" } } */
       8  
       9  signed char
      10  a (short x, short y)
      11  {
      12    unsigned char t = (unsigned char) (x & y);
      13    unsigned char tt = (unsigned char) (x | y);
      14    t = t - tt;
      15    return (signed char) (t + -1);
      16  }
      17  
      18  unsigned char
      19  a1 (signed char x, signed char y)
      20  {
      21    short t = (short) (x & y);
      22    short tt = (short) (x | y);
      23    unsigned char t1 = (unsigned char) (t - tt);
      24    return t1 + -1;
      25  }
      26  
      27  signed char
      28  b (short x, short y)
      29  {
      30    unsigned char t = (unsigned char) (x & y);
      31    signed char tt = (signed char) (x | y);
      32    t = t - 1;
      33    return ((signed char) t - tt);
      34  }
      35  
      36  short
      37  b1 (short x, short y)
      38  {
      39    int t = (int) (x & y);
      40    int tt = (int) (x | y);
      41    short t1 = (short) (t - 1);
      42    return (short) (t1 - tt);
      43  }
      44  
      45  signed char
      46  c (unsigned x, unsigned y)
      47  {
      48    unsigned char t = (unsigned char) (x & y);
      49    signed char tt = (signed char) (x | y);
      50    tt = tt + 1;
      51    return (signed char) (t - tt);
      52  }
      53  
      54  unsigned char
      55  c1 (signed char x, signed char y)
      56  {
      57    unsigned char t = (unsigned char) (x & y);
      58    short tt = (short) (x | y);
      59    unsigned char tt1 = (unsigned char) (tt + 1);
      60    return t - tt1;
      61  }
      62  
      63  signed char
      64  d (unsigned char x, unsigned char y)
      65  {
      66    int t = (int) (x & y);
      67    int tt = (int) (x | y);
      68    tt = tt + 1;
      69    return (signed char) (t - tt);
      70  }
      71  
      72  unsigned char
      73  d1 (int x, int y)
      74  {
      75    signed char t = (signed char) (x & y);
      76    signed char tt = (signed char) (x | y);
      77    unsigned char tt1 = (unsigned char) (tt + 1);
      78    return (unsigned char) (t - tt1);
      79  }