From patchwork Sun Jul 22 05:31:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Committed] Add two new aliasing testcases Date: Sat, 21 Jul 2012 19:31:44 -0000 From: Andrew Pinski X-Patchwork-Id: 172476 Message-Id: To: GCC Patches Hi, I thought I would add these two aliasing testcases which I have in Cavium's private tree for a while now. They both pass since the addition of MEM_REF. Committed as obvious after a bootstrap and test on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski 2012-07-21 Andrew Pinski * gcc.dg/tree-ssa/alias-21.c: New testcase. * gcc.dg/tree-ssa/alias-22.c: New testcase. Index: testsuite/gcc.dg/tree-ssa/alias-21.c =================================================================== --- testsuite/gcc.dg/tree-ssa/alias-21.c (revision 0) +++ testsuite/gcc.dg/tree-ssa/alias-21.c (revision 0) @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + + +int f(int *r) +{ + r[0] = 0; + r[1] = 1; + return r[0]; +} + + +/* { dg-final { scan-tree-dump-times "return 0;" 1 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ + Index: testsuite/gcc.dg/tree-ssa/alias-22.c =================================================================== --- testsuite/gcc.dg/tree-ssa/alias-22.c (revision 0) +++ testsuite/gcc.dg/tree-ssa/alias-22.c (revision 0) @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + + +int f(int *r) +{ + r[1] = 0; + r[2] = 1; + return r[1]; +} + + +/* { dg-final { scan-tree-dump-times "return 0;" 1 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ + Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 189751) +++ testsuite/ChangeLog (working copy) @@ -1,5 +1,10 @@ 2012-07-21 Andrew Pinski + * gcc.dg/tree-ssa/alias-21.c: New testcase. + * gcc.dg/tree-ssa/alias-22.c: New testcase. + +2012-07-21 Andrew Pinski + * gcc.target/mips/octeon-pop-2.c: New testcase. 2012-07-21 Tobias Burnus