Message ID | CAO2gOZWLUUEAmBDWthEmsiMDnRi565sfb7SLn5rur4=GkD8gWA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Fri, Jan 24, 2014 at 10:20:53AM -0800, Dehao Chen wrote: > --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) > +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) > @@ -0,0 +1,12 @@ > +/* { dg-do compile { target { x86_64-*-* } } } */ If you want it for x86_64 64-bit, then /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ (or just limit the scan-rtl-dump-times regexp to the above mentioned target). > +/* { dg-options "-O2 -fdump-rtl-expand -c" } */ No -c in dg-options please. Jakub
On Fri, Jan 24, 2014 at 10:57 AM, Jakub Jelinek <jakub@redhat.com> wrote: > On Fri, Jan 24, 2014 at 10:20:53AM -0800, Dehao Chen wrote: >> --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) >> +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) >> @@ -0,0 +1,12 @@ >> +/* { dg-do compile { target { x86_64-*-* } } } */ > > If you want it for x86_64 64-bit, then > /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ > It should be "! { ia32 }" instead of "lp64" unless it doesn't work for x32.
Index: gcc/testsuite/gcc.dg/predict-8.c =================================================================== --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) @@ -0,0 +1,12 @@ +/* { dg-do compile { target { x86_64-*-* } } } */ +/* { dg-options "-O2 -fdump-rtl-expand -c" } */ + +int foo(float a, float b) { + if (a == b) + return 1; + else + return 2; +} + +/* { dg-final { scan-rtl-dump-times "REG_BR_PROB 100" 1 "expand"} } */ +/* { dg-final { cleanup-rtl-dump "expand" } } */