view gcc/testsuite/gcc.target/aarch64/cmn-neg2.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-options "-O2 --save-temps" } */

extern void abort (void);

/* It's unsafe to use CMN in these comparisons.  */

void __attribute__ ((noinline))
foo_s32 (int a, int b)
{
  if (a < -b)
    abort ();
}

void __attribute__ ((noinline))
foo_s64 (unsigned long long a, unsigned long long b)
{
  if (a > -b)
    abort ();
}


int
main (void)
{
  int a = 30;
  int b = 42;
  foo_s32 (a, b);
  foo_s64 (a, b);
  return 0;
}
/* { dg-final { scan-assembler-not "cmn\t" } } */