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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr30957-1.c] - Blame information for rev 300

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run { xfail *-*-* } } */
2
/* We don't (and don't want to) perform this optimisation on soft-float
3
   targets, where each addition is a library call.  This test requires
4
   -fassociative-math for enabling the variable-expansion as well as
5
   -fsigned-zeros for honoring the sign of zero; but
6
   they can not co-exist; also under -funsafe-math-optimizations, so we
7
   expect it to fail.  */
8
/* { dg-require-effective-target hard_float } */
9
/* { dg-options "-O2 -funroll-loops -funsafe-math-optimizations -fvariable-expansion-in-unroller -fdump-rtl-loop2_unroll" } */
10
 
11
extern void abort (void);
12
extern void exit (int);
13
 
14
float __attribute__((noinline))
15
foo (float d, int n)
16
{
17
  unsigned i;
18
  float accum = d;
19
 
20
  for (i = 0; i < n; i++)
21
    accum += d;
22
 
23
  return accum;
24
}
25
 
26
int
27
main ()
28
{
29
  if (__builtin_copysignf (1.0, foo (0.0 / -5.0, 10)) != -1.0)
30
    abort ();
31
  exit (0);
32
}
33
 
34
/* { dg-final { scan-rtl-dump "Expanding Accumulator" "loop2_unroll" } } */
35
/* { dg-final { cleanup-rtl-dump "loop*" } } */
36
 
37
 

powered by: WebSVN 2.1.0

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