aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c
blob: 6813b4323020bc710f7550a10ba3679fbd4b5fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* This test requires:

      TRULY_NOOP_TRUNCATION (sizeof (int) * CHAR_BIT,
			     sizeof (long long) * CHAR_BIT)

   When the condition is true, we distribute "(int) (a + b)" as
   "(int) a + (int) b", otherwise we keep the original.  */
/* { dg-do compile { target { { ! mips64 } && { ! spu-*-* } } } } */
/* { dg-options "-O -fno-tree-forwprop -fwrapv -fdump-tree-fre1-details" } */

/* From PR14844.  */

int
foo (int a, int b)
{
  long long aa = a;
  long long bb = b;
  return aa + bb;
}

/* { dg-final { scan-tree-dump "Replaced \\\(int\\\) aa_.*with a_" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */