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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [reassoc-1.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
 
4
int a, b, c, d;
5
extern int printf (const char *, ...);
6
int main(void)
7
{
8
  int e;
9
  int f;
10
  /* We should be able to transform these into the same expression, and only have two additions.  */
11
  e = a + b;
12
  e = e + c;
13
  f = c + a;
14
  f = f + b;
15
  printf ("%d %d\n", e, f);
16
}
17
 
18
/* We cannot reassociate these expressions because of undefined signed
19
   integer overflow.  Instead the value-numberer has to be extended
20
   to canonicalize these expressions.  */
21
 
22
/* { dg-final { scan-tree-dump-times "b.._. \\\+ a.._." 1 "optimized" { xfail *-*-* } } } */
23
/* { dg-final { scan-tree-dump-times " \\\+ " 2 "optimized" { xfail *-*-* } } } */
24
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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