OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [sms-8.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/*  This test is a reduced test case for a bug that caused
/*  This test is a reduced test case for a bug that caused
    bootstrapping with -fmodulo-sched.  Related to a broken anti-dep
    bootstrapping with -fmodulo-sched.  Related to a broken anti-dep
    that was not fixed by reg-moves.  */
    that was not fixed by reg-moves.  */
 
 
 /* { dg-do run } */
 /* { dg-do run } */
 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
 
 
extern void abort (void);
extern void abort (void);
 
 
__attribute__ ((noinline))
__attribute__ ((noinline))
unsigned long long
unsigned long long
foo (long long ixi, unsigned ctr)
foo (long long ixi, unsigned ctr)
{
{
  unsigned long long irslt = 1;
  unsigned long long irslt = 1;
  long long ix = ixi;
  long long ix = ixi;
 
 
  for (; ctr; ctr--)
  for (; ctr; ctr--)
    {
    {
      irslt *= ix;
      irslt *= ix;
      ix *= ix;
      ix *= ix;
    }
    }
 
 
  if (irslt != 14348907)
  if (irslt != 14348907)
    abort ();
    abort ();
  return irslt;
  return irslt;
}
}
 
 
 
 
int
int
main ()
main ()
{
{
  unsigned long long res;
  unsigned long long res;
 
 
  res = foo (3, 4);
  res = foo (3, 4);
  return 0;
  return 0;
}
}
 
 
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
 
 
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.