From: Tom de Vries <vries@codesourcery.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: Steven Bosscher <stevenb.gcc@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, PR43864] Gimple level duplicate block cleanup - test cases.
Date: Mon, 18 Jul 2011 02:54:00 -0000 [thread overview]
Message-ID: <4E232B0F.5040804@codesourcery.com> (raw)
In-Reply-To: <4DEF44C1.4070800@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
Updated version.
On 06/08/2011 11:45 AM, Tom de Vries wrote:
> On 06/08/2011 11:42 AM, Tom de Vries wrote:
>
>> I'll send the patch with the testcases in a separate email.
>
OK for trunk?
Thanks,
- Tom
2011-07-17 Tom de Vries <tom@codesourcery.com>
PR middle-end/43864
* gcc.dg/fold-compare-2.c (dg-options): Add -fno-tree-tail-merge.
* gcc/testsuite/gcc.dg/uninit-pred-2_c.c: Same.
* gcc.dg/pr43864.c: New test.
* gcc.dg/pr43864-2.c: Same.
[-- Attachment #2: pr43864.31.test.patch --]
[-- Type: text/x-patch, Size: 2481 bytes --]
Index: gcc/testsuite/gcc.dg/fold-compare-2.c
===================================================================
--- gcc/testsuite/gcc.dg/fold-compare-2.c (revision 175801)
+++ gcc/testsuite/gcc.dg/fold-compare-2.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp" } */
+/* { dg-options "-O2 -fno-tree-tail-merge -fdump-tree-vrp" } */
extern void abort (void);
Index: gcc/testsuite/gcc.dg/uninit-pred-2_c.c
===================================================================
--- gcc/testsuite/gcc.dg/uninit-pred-2_c.c (revision 175801)
+++ gcc/testsuite/gcc.dg/uninit-pred-2_c.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2" } */
+/* { dg-options "-Wuninitialized -O2 -fno-tree-tail-merge" } */
int g;
void bar (void);
Index: gcc/testsuite/gcc.dg/pr43864.c
===================================================================
--- gcc/testsuite/gcc.dg/pr43864.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr43864.c (revision 0)
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+extern void foo (char*, int);
+extern void mysprintf (char *, char *);
+extern void myfree (void *);
+extern int access (char *, int);
+extern int fopen (char *, int);
+
+char *
+hprofStartupp (char *outputFileName, char *ctx)
+{
+ char fileName[1000];
+ int fp;
+ mysprintf (fileName, outputFileName);
+ if (access (fileName, 1) == 0)
+ {
+ myfree (ctx);
+ return 0;
+ }
+
+ fp = fopen (fileName, 0);
+ if (fp == 0)
+ {
+ myfree (ctx);
+ return 0;
+ }
+
+ foo (outputFileName, fp);
+
+ return ctx;
+}
+
+/* { dg-final { scan-tree-dump-times "myfree" 1 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: gcc/testsuite/gcc.dg/pr43864-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr43864-2.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr43864-2.c (revision 0)
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int
+f (int c, int b, int d)
+{
+ int r, e;
+
+ if (c)
+ r = b + d;
+ else
+ {
+ e = b + d;
+ r = e;
+ }
+
+ return r;
+}
+
+/* { dg-final { scan-tree-dump-times "if " 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\\+" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "PHI" 0 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
next prev parent reply other threads:[~2011-07-17 18:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 9:49 [PATCH, PR43864] Gimple level duplicate block cleanup Tom de Vries
2011-06-08 9:55 ` [PATCH, PR43864] Gimple level duplicate block cleanup - test cases Tom de Vries
2011-07-18 2:54 ` Tom de Vries [this message]
2011-08-19 18:38 ` Tom de Vries
2011-08-25 10:09 ` Richard Guenther
2011-06-08 10:09 ` [PATCH, PR43864] Gimple level duplicate block cleanup Richard Guenther
2011-06-08 10:40 ` Steven Bosscher
2011-06-10 17:16 ` Tom de Vries
2011-06-14 15:12 ` Richard Guenther
2011-07-12 12:21 ` Tom de Vries
2011-07-12 14:37 ` Richard Guenther
2011-07-18 0:41 ` Tom de Vries
2011-07-22 15:54 ` Richard Guenther
2011-08-19 18:33 ` Tom de Vries
2011-08-24 9:00 ` Tom de Vries
2011-08-25 1:07 ` Ian Lance Taylor
2011-08-25 9:30 ` Richard Guenther
2011-06-10 18:43 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E232B0F.5040804@codesourcery.com \
--to=vries@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
--cc=stevenb.gcc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).