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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [sms-8.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/*  This test is a reduced test case for a bug that caused
2
    bootstrapping with -fmodulo-sched.  Related to a broken anti-dep
3
    that was not fixed by reg-moves.  */
4
 
5
 /* { dg-do run } */
6
 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1" } */
7
 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" { target powerpc*-*-* } } */
8
 
9
extern void abort (void);
10
 
11
__attribute__ ((noinline))
12
unsigned long long
13
foo (long long ixi, unsigned ctr)
14
{
15
  unsigned long long irslt = 1;
16
  long long ix = ixi;
17
 
18
  for (; ctr; ctr--)
19
    {
20
      irslt *= ix;
21
      ix *= ix;
22
    }
23
 
24
  if (irslt != 14348907)
25
    abort ();
26
  return irslt;
27
}
28
 
29
 
30
int
31
main ()
32
{
33
  unsigned long long res;
34
 
35
  res = foo (3, 4);
36
  return 0;
37
}
38
 
39
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 0 "sms" { target powerpc*-*-* } } } */
40
/* { dg-final { cleanup-rtl-dump "sms" } } */
41
 
42
 

powered by: WebSVN 2.1.0

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