aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/csinc-1.c
blob: 255e6e89f50c0fd3ec476bb36fcc76bc395e3d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
/* { dg-options "-O2" } */
/* { dg-add-options arm_arch_v8_1m_main } */

int
test_csinc32_condasn1(int w0, int w1, int w2, int w3)
{
  int w4;

  /* { dg-final { scan-assembler "csinc\tr\[0-9\]*.*ne" } } */
  w4 = (w0 == w1) ? (w2 + 1) : w3;
  return w4;
}

int
test_csinc32_condasn2(int w0, int w1, int w2, int w3)
{
  int w4;

  /* { dg-final { scan-assembler "csinc\tr\[0-9\]*.*eq" } } */
  w4 = (w0 == w1) ? w3 : (w2 + 1);
  return w4;
}