This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Missing testcases
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Nov 2003 16:38:41 -0500
- Subject: Re: [tree-ssa] Missing testcases
- Organization: Red Hat Canada
- References: <20031112195336.GM1729@kam.mff.cuni.cz>
On Wed, 2003-11-12 at 14:53, Jan Hubicka wrote:
> Hi,
> here are testcases for few optimizations not being covered by testsuite
> at all. If you point me more, I will write new as well. I hope to get
> at least trivial testcases for all optimizations performed.
>
> OK?
> Honza
> /* { dg-do compile } */
> /* { dg-options "-O2 -fdump-tree-dom1-details" } */
> int t(int a) __attribute__ ((const));
> threading(int b)
> {
> int a=1;
> a++;
> a++;
> a++;
> if (b)
> abort();
> return a;
> }
> /* We should thread the jump twice and elliminate it. */
> /* { dg-final { scan-tree-dump-times "Replaced.*with constant '4'" 1 "dom1"} } */
>
The comment is misleading here. DOM is simply constant propagating in
this case, not threading jumps.
Alternately, you could just scan for 'return 4' in the .optimized dump.
Or are you trying to test something more specific?
Also, there's only one 'l' in eliminate.
Otherwise, the tests look OK. Thanks.
Another category of tests that would be interesting to add are those
that we should be getting right, but aren't.
Diego.