diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c new file mode 100644 index 000000000..85e444886 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c @@ -0,0 +1,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 -fwrapv -fdump-tree-fre-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_" "fre" } } */ +/* { dg-final { cleanup-tree-dump "fre" } } */ |