(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
csinc-1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  unsigned int
       5  test_csinc32_ifcvt(unsigned int w0,
       6  		   unsigned int w1,
       7  		   unsigned int w2) {
       8    /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
       9    if (w0 == w1)
      10      ++ w2;
      11  
      12    return w2;
      13  }
      14  
      15  unsigned int
      16  test_csinc32_condasn1(unsigned int w0,
      17  		      unsigned int w1,
      18  		      unsigned int w2,
      19  		      unsigned int w3) {
      20    unsigned int w4;
      21  
      22    /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
      23    w4 = (w0 == w1) ? (w3 + 1) : w2;
      24    return w4;
      25  }
      26  
      27  unsigned int
      28  test_csinc32_condasn2(unsigned int w0,
      29  		      unsigned int w1,
      30  		      unsigned int w2,
      31  		      unsigned int w3) {
      32    unsigned int w4;
      33  
      34    /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*eq" } } */
      35    w4 = (w0 == w1) ? w2 : (w3 + 1);
      36    return w4;
      37  }
      38  
      39  unsigned long long
      40  test_csinc64_ifcvt(unsigned long long x0,
      41  		   unsigned long long x1,
      42  		   unsigned long long x2) {
      43    /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
      44    if (x0 == x1)
      45      ++ x2;
      46  
      47    return x2;
      48  }
      49  
      50  unsigned long long
      51  test_csinc64_condasn1(unsigned long long x0,
      52  		      unsigned long long x1,
      53  		      unsigned long long x2,
      54  		      unsigned long long x3) {
      55    unsigned long long x4;
      56  
      57    /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
      58    x4 = (x0 == x1) ? (x3 + 1) : x2;
      59    return x4;
      60  }
      61  
      62  unsigned long long
      63  test_csinc64_condasn2(unsigned long long x0,
      64  		      unsigned long long x1,
      65  		      unsigned long long x2,
      66  		      unsigned long long x3) {
      67    unsigned long long x4;
      68  
      69    /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*eq" } } */
      70    x4 = (x0 == x1) ? x2 : (x3 + 1);
      71    return x4;
      72  }