aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/cmn-neg.c
blob: ab264e798efae9afce44c1bdb3f21ecc7c632c68 (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
25
26
27
28
29
30
31
32
33
/* { dg-do run } */
/* { dg-options "-O2 --save-temps" } */

extern void abort (void);

void __attribute__ ((noinline))
foo_s32 (int a, int b)
{
  if (a == -b)
    abort ();
}
/* { dg-final { scan-assembler "cmn\tw\[0-9\]" } } */

void __attribute__ ((noinline))
foo_s64 (long long a, long long b)
{
  if (a == -b)
    abort ();
}
/* { dg-final { scan-assembler "cmn\tx\[0-9\]" } } */


int
main (void)
{
  int a = 30;
  int b = 42;
  foo_s32 (a, b);
  foo_s64 (a, b);
  return 0;
}

/* { dg-final { cleanup-saved-temps } } */