[PATCH] Set correct probability for ORDER/UNORDER jumps
Dehao Chen
dehao@google.com
Fri Jan 24 21:54:00 GMT 2014
Thanks, test updated:
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 { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+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" } } */
On Fri, Jan 24, 2014 at 11:38 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.
>
> --
> H.J.
More information about the Gcc-patches
mailing list