(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sparc/
setcc-7.c
       1  /* { dg-do compile } */
       2  /* { dg-require-effective-target lp64 } */
       3  /* { dg-options "-O1 -mno-vis3" } */
       4  
       5  long foo1 (long a, int i)
       6  {
       7    return a + (i != 0);
       8  }
       9  
      10  long foo2 (long a, int i)
      11  {
      12    return a - (i != 0);
      13  }
      14  
      15  long foo3 (long a, long b, int i)
      16  {
      17    return a + b + (i != 0);
      18  }
      19  
      20  long foo4 (long a, long b, int i)
      21  {
      22    return a - b - (i != 0);
      23  }
      24  
      25  long foo5 (long a, int i)
      26  {
      27    return a + (i == 0);
      28  }
      29  
      30  long foo6 (long a, int i)
      31  {
      32    return a - (i == 0);
      33  }
      34  
      35  /* { dg-final { scan-assembler-times "addx\t%" 3 } } */
      36  /* { dg-final { scan-assembler-times "subx\t%" 3 } } */
      37  /* { dg-final { scan-assembler-times "cmp\t%" 6 } } */
      38  /* { dg-final { scan-assembler-not "add\t%" } } */
      39  /* { dg-final { scan-assembler-not "sub\t%" } } */