public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Bug fix for PR59050
@ 2013-11-08 18:53 Cong Hou
  2013-11-08 20:49 ` H.J. Lu
  2013-11-11  9:37 ` Richard Biener
  0 siblings, 2 replies; 7+ messages in thread
From: Cong Hou @ 2013-11-08 18:53 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Biener

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050

This is my bad. I forget to check the test result for gfortran. With
this patch the bug should be fixed (tested on x86-64).


thanks,
Cong


diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90b01f2..e62c672 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-08  Cong Hou  <congh@google.com>
+
+       PR tree-optimization/59050
+       * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
+
 2013-11-07  Cong Hou  <congh@google.com>

        * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index b2a31b1..b7eb926 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -2669,9 +2669,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
const void *p2_)
       if (comp_res != 0)
        return comp_res;
     }
-  if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
+  else if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
     return -1;
-  if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
+  else if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
     return 1;
   if (TREE_CODE (p12.offset) != INTEGER_CST
       || TREE_CODE (p22.offset) != INTEGER_CST)
@@ -2680,9 +2680,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
const void *p2_)
       if (comp_res != 0)
        return comp_res;
     }
-  if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
+  else if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
     return -1;
-  if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
+  else if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
     return 1;

   return 0;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-08 18:53 [PATCH] Bug fix for PR59050 Cong Hou
@ 2013-11-08 20:49 ` H.J. Lu
  2013-11-08 21:27   ` Cong Hou
  2013-11-11  9:37 ` Richard Biener
  1 sibling, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2013-11-08 20:49 UTC (permalink / raw)
  To: Cong Hou; +Cc: GCC Patches, Richard Biener

On Fri, Nov 8, 2013 at 10:34 AM, Cong Hou <congh@google.com> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
>
> This is my bad. I forget to check the test result for gfortran. With
> this patch the bug should be fixed (tested on x86-64).
>
>
> thanks,
> Cong
>
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 90b01f2..e62c672 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-11-08  Cong Hou  <congh@google.com>
> +
> +       PR tree-optimization/59050
> +       * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
> +

Many SPEC CPU 2000 tests failed with

costab.c: In function 'HandleCoinc2':
costab.c:1565:17: internal compiler error: tree check: expected
integer_cst, have plus_expr in tree_int_cst_lt, at tree.c:7083
 void            HandleCoinc2 ( cos1, cos2, hdfactor )
                 ^
0xb6e084 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
    ../../src-trunk/gcc/tree.c:9477
0xb6ffe4 tree_check
    ../../src-trunk/gcc/tree.h:2914
0xb6ffe4 tree_int_cst_lt(tree_node const*, tree_node const*)
    ../../src-trunk/gcc/tree.c:7083
0xb70020 tree_int_cst_compare(tree_node const*, tree_node const*)
    ../../src-trunk/gcc/tree.c:7093
0xe53f1c comp_dr_addr_with_seg_len_pair
    ../../src-trunk/gcc/tree-vect-data-refs.c:2672
0xe5cbb5 vec<dr_addr_with_seg_len_pair_t, va_heap,
vl_embed>::qsort(int (*)(void const*, void const*))
    ../../src-trunk/gcc/vec.h:941
0xe5cbb5 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_ptr>::qsort(int
(*)(void const*, void const*))
    ../../src-trunk/gcc/vec.h:1620
0xe5cbb5 vect_prune_runtime_alias_test_list(_loop_vec_info*)
    ../../src-trunk/gcc/tree-vect-data-refs.c:2845
0xb39382 vect_analyze_loop_2
    ../../src-trunk/gcc/tree-vect-loop.c:1716
0xb39382 vect_analyze_loop(loop*)
    ../../src-trunk/gcc/tree-vect-loop.c:1807
0xb4f78f vectorize_loops()
    ../../src-trunk/gcc/tree-vectorizer.c:360
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
specmake[3]: *** [costab.o] Error 1
specmake[3]: *** Waiting for unfinished jobs....

Will this patch fix them?


-- 
H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-08 20:49 ` H.J. Lu
@ 2013-11-08 21:27   ` Cong Hou
  0 siblings, 0 replies; 7+ messages in thread
From: Cong Hou @ 2013-11-08 21:27 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GCC Patches, Richard Biener

Yes, I think so. The bug is that the arguments of
tree_int_cst_compare() may not be constant integers. This patch should
take care of it.



thanks,
Cong


On Fri, Nov 8, 2013 at 12:06 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Nov 8, 2013 at 10:34 AM, Cong Hou <congh@google.com> wrote:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
>>
>> This is my bad. I forget to check the test result for gfortran. With
>> this patch the bug should be fixed (tested on x86-64).
>>
>>
>> thanks,
>> Cong
>>
>>
>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index 90b01f2..e62c672 100644
>> --- a/gcc/ChangeLog
>> +++ b/gcc/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2013-11-08  Cong Hou  <congh@google.com>
>> +
>> +       PR tree-optimization/59050
>> +       * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
>> +
>
> Many SPEC CPU 2000 tests failed with
>
> costab.c: In function 'HandleCoinc2':
> costab.c:1565:17: internal compiler error: tree check: expected
> integer_cst, have plus_expr in tree_int_cst_lt, at tree.c:7083
>  void            HandleCoinc2 ( cos1, cos2, hdfactor )
>                  ^
> 0xb6e084 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
>     ../../src-trunk/gcc/tree.c:9477
> 0xb6ffe4 tree_check
>     ../../src-trunk/gcc/tree.h:2914
> 0xb6ffe4 tree_int_cst_lt(tree_node const*, tree_node const*)
>     ../../src-trunk/gcc/tree.c:7083
> 0xb70020 tree_int_cst_compare(tree_node const*, tree_node const*)
>     ../../src-trunk/gcc/tree.c:7093
> 0xe53f1c comp_dr_addr_with_seg_len_pair
>     ../../src-trunk/gcc/tree-vect-data-refs.c:2672
> 0xe5cbb5 vec<dr_addr_with_seg_len_pair_t, va_heap,
> vl_embed>::qsort(int (*)(void const*, void const*))
>     ../../src-trunk/gcc/vec.h:941
> 0xe5cbb5 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_ptr>::qsort(int
> (*)(void const*, void const*))
>     ../../src-trunk/gcc/vec.h:1620
> 0xe5cbb5 vect_prune_runtime_alias_test_list(_loop_vec_info*)
>     ../../src-trunk/gcc/tree-vect-data-refs.c:2845
> 0xb39382 vect_analyze_loop_2
>     ../../src-trunk/gcc/tree-vect-loop.c:1716
> 0xb39382 vect_analyze_loop(loop*)
>     ../../src-trunk/gcc/tree-vect-loop.c:1807
> 0xb4f78f vectorize_loops()
>     ../../src-trunk/gcc/tree-vectorizer.c:360
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> specmake[3]: *** [costab.o] Error 1
> specmake[3]: *** Waiting for unfinished jobs....
>
> Will this patch fix them?
>
>
> --
> H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-08 18:53 [PATCH] Bug fix for PR59050 Cong Hou
  2013-11-08 20:49 ` H.J. Lu
@ 2013-11-11  9:37 ` Richard Biener
  2013-11-11 19:44   ` Jeff Law
  2013-11-11 21:07   ` Cong Hou
  1 sibling, 2 replies; 7+ messages in thread
From: Richard Biener @ 2013-11-11  9:37 UTC (permalink / raw)
  To: Cong Hou; +Cc: GCC Patches

On Fri, 8 Nov 2013, Cong Hou wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
> 
> This is my bad. I forget to check the test result for gfortran. With
> this patch the bug should be fixed (tested on x86-64).

Ok.

Btw, requirements are to bootstrap and test with all default
languages enabled (that is, without any --enable-languages or
--enable-languages=all).  That
gets you c,c++,objc,java,fortran,lto and misses obj-c++ ada and go.
I am personally using --enable-languages=all,ada,obj-c++.

Thanks,
Richard.

> thanks,
> Cong
> 
> 
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 90b01f2..e62c672 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-11-08  Cong Hou  <congh@google.com>
> +
> +       PR tree-optimization/59050
> +       * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
> +
>  2013-11-07  Cong Hou  <congh@google.com>
> 
>         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
> diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
> index b2a31b1..b7eb926 100644
> --- a/gcc/tree-vect-data-refs.c
> +++ b/gcc/tree-vect-data-refs.c
> @@ -2669,9 +2669,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
> const void *p2_)
>        if (comp_res != 0)
>         return comp_res;
>      }
> -  if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
> +  else if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
>      return -1;
> -  if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
> +  else if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
>      return 1;
>    if (TREE_CODE (p12.offset) != INTEGER_CST
>        || TREE_CODE (p22.offset) != INTEGER_CST)
> @@ -2680,9 +2680,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
> const void *p2_)
>        if (comp_res != 0)
>         return comp_res;
>      }
> -  if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
> +  else if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
>      return -1;
> -  if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
> +  else if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
>      return 1;
> 
>    return 0;
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-11  9:37 ` Richard Biener
@ 2013-11-11 19:44   ` Jeff Law
  2013-11-11 21:06     ` Cong Hou
  2013-11-11 21:07   ` Cong Hou
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Law @ 2013-11-11 19:44 UTC (permalink / raw)
  To: Richard Biener, Cong Hou; +Cc: GCC Patches

On 11/11/13 02:32, Richard Biener wrote:
> On Fri, 8 Nov 2013, Cong Hou wrote:
>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
>>
>> This is my bad. I forget to check the test result for gfortran. With
>> this patch the bug should be fixed (tested on x86-64).
>
> Ok.
>
> Btw, requirements are to bootstrap and test with all default
> languages enabled (that is, without any --enable-languages or
> --enable-languages=all).  That
> gets you c,c++,objc,java,fortran,lto and misses obj-c++ ada and go.
> I am personally using --enable-languages=all,ada,obj-c++.
FWIW, I bootstrapped with Cong's patch to keep my own test results 
clean.  So it's already been through those tests.

If Cong doesn't get to it soon, I'll check it in myself.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-11 19:44   ` Jeff Law
@ 2013-11-11 21:06     ` Cong Hou
  0 siblings, 0 replies; 7+ messages in thread
From: Cong Hou @ 2013-11-11 21:06 UTC (permalink / raw)
  To: Jeff Law; +Cc: Richard Biener, GCC Patches

Hi Jeff

I have committed the fix. Please update your repo.

Thank you!


Cong



On Mon, Nov 11, 2013 at 10:32 AM, Jeff Law <law@redhat.com> wrote:
> On 11/11/13 02:32, Richard Biener wrote:
>>
>> On Fri, 8 Nov 2013, Cong Hou wrote:
>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
>>>
>>> This is my bad. I forget to check the test result for gfortran. With
>>> this patch the bug should be fixed (tested on x86-64).
>>
>>
>> Ok.
>>
>> Btw, requirements are to bootstrap and test with all default
>> languages enabled (that is, without any --enable-languages or
>> --enable-languages=all).  That
>> gets you c,c++,objc,java,fortran,lto and misses obj-c++ ada and go.
>> I am personally using --enable-languages=all,ada,obj-c++.
>
> FWIW, I bootstrapped with Cong's patch to keep my own test results clean.
> So it's already been through those tests.
>
> If Cong doesn't get to it soon, I'll check it in myself.
>
> jeff
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Bug fix for PR59050
  2013-11-11  9:37 ` Richard Biener
  2013-11-11 19:44   ` Jeff Law
@ 2013-11-11 21:07   ` Cong Hou
  1 sibling, 0 replies; 7+ messages in thread
From: Cong Hou @ 2013-11-11 21:07 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

Thank you for your advice! I will follow this instruction in future.


thanks,
Cong


On Mon, Nov 11, 2013 at 1:32 AM, Richard Biener <rguenther@suse.de> wrote:
> On Fri, 8 Nov 2013, Cong Hou wrote:
>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59050
>>
>> This is my bad. I forget to check the test result for gfortran. With
>> this patch the bug should be fixed (tested on x86-64).
>
> Ok.
>
> Btw, requirements are to bootstrap and test with all default
> languages enabled (that is, without any --enable-languages or
> --enable-languages=all).  That
> gets you c,c++,objc,java,fortran,lto and misses obj-c++ ada and go.
> I am personally using --enable-languages=all,ada,obj-c++.
>
> Thanks,
> Richard.
>
>> thanks,
>> Cong
>>
>>
>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index 90b01f2..e62c672 100644
>> --- a/gcc/ChangeLog
>> +++ b/gcc/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2013-11-08  Cong Hou  <congh@google.com>
>> +
>> +       PR tree-optimization/59050
>> +       * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
>> +
>>  2013-11-07  Cong Hou  <congh@google.com>
>>
>>         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
>> diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
>> index b2a31b1..b7eb926 100644
>> --- a/gcc/tree-vect-data-refs.c
>> +++ b/gcc/tree-vect-data-refs.c
>> @@ -2669,9 +2669,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
>> const void *p2_)
>>        if (comp_res != 0)
>>         return comp_res;
>>      }
>> -  if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
>> +  else if (tree_int_cst_compare (p11.offset, p21.offset) < 0)
>>      return -1;
>> -  if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
>> +  else if (tree_int_cst_compare (p11.offset, p21.offset) > 0)
>>      return 1;
>>    if (TREE_CODE (p12.offset) != INTEGER_CST
>>        || TREE_CODE (p22.offset) != INTEGER_CST)
>> @@ -2680,9 +2680,9 @@ comp_dr_addr_with_seg_len_pair (const void *p1_,
>> const void *p2_)
>>        if (comp_res != 0)
>>         return comp_res;
>>      }
>> -  if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
>> +  else if (tree_int_cst_compare (p12.offset, p22.offset) < 0)
>>      return -1;
>> -  if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
>> +  else if (tree_int_cst_compare (p12.offset, p22.offset) > 0)
>>      return 1;
>>
>>    return 0;
>>
>>
>
> --
> Richard Biener <rguenther@suse.de>
> SUSE / SUSE Labs
> SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
> GF: Jeff Hawn, Jennifer Guild, Felix Imend

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-11 19:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-08 18:53 [PATCH] Bug fix for PR59050 Cong Hou
2013-11-08 20:49 ` H.J. Lu
2013-11-08 21:27   ` Cong Hou
2013-11-11  9:37 ` Richard Biener
2013-11-11 19:44   ` Jeff Law
2013-11-11 21:06     ` Cong Hou
2013-11-11 21:07   ` Cong Hou

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).