(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sh/
pr51244-5.c
       1  /* Check that no unnecessary sign or zero extension insn is generated after
       2     a negc or movrt insn that stores the inverted T bit in a reg.  */
       3  /* { dg-do compile }  */
       4  /* { dg-options "-O2" } */
       5  /* { dg-final { scan-assembler-not "extu|exts" } } */
       6  
       7  int
       8  test_00 (int a, int b, int* c, short* d, int x)
       9  {
      10    *d = x != 0;
      11    *c = -1;
      12  
      13    if (x != 0)
      14      return a > 0;
      15  
      16    return 0;
      17  }
      18  
      19  unsigned char
      20  test_01 (int x)
      21  {
      22    if (x < 58 && x > 47)
      23      return 1;
      24    return 0;
      25  }
      26  
      27  char
      28  test_02 (int x)
      29  {
      30    if (x < 58 && x > 47)
      31      return 1;
      32    return 0;
      33  }
      34  
      35  unsigned short
      36  test_03 (int x)
      37  {
      38    if (x < 58 && x > 47)
      39      return 1;
      40    return 0;
      41  }
      42  
      43  short
      44  test_04 (int x)
      45  {
      46    if (x < 58 && x > 47)
      47      return 1;
      48    return 0;
      49  }