This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Missing testcases


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]