This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR70484, RTL DSE using wrong dependence check
- From: Richard Biener <rguenther at suse dot de>
- To: Bernd Schmidt <bschmidt at redhat dot com>,gcc-patches at gcc dot gnu dot org
- Date: Fri, 01 Apr 2016 19:25:30 +0200
- Subject: Re: [PATCH] Fix PR70484, RTL DSE using wrong dependence check
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1604011106140 dot 13384 at t29 dot fhfr dot qr> <56FE931D dot 4030604 at redhat dot com>
On April 1, 2016 5:26:21 PM GMT+02:00, Bernd Schmidt <bschmidt@redhat.com> wrote:
>On 04/01/2016 11:08 AM, Richard Biener wrote:
>> {
>> ! if (canon_true_dependence (s_info->mem,
>> ! GET_MODE (s_info->mem),
>> ! s_info->mem_addr,
>> ! mem, mem_addr))
>> {
>> s_info->rhs = NULL;
>> s_info->const_rhs = NULL;
>> --- 1609,1617 ----
>> the value of store_info. If it is, set the rhs to NULL to
>> keep it from being used to remove a load. */
>> {
>> ! if (canon_output_dependence (s_info->mem, true,
>> ! mem, GET_MODE (mem),
>> ! mem_addr))
>> {
>> s_info->rhs = NULL;
>> s_info->const_rhs = NULL;
>
>I think the patch is ok, but there is a comment in that function which
>references canon_true_dependence; that should also be fixed up.
>
>Isn't the testcase invalid though? I thought accesses through char *
>pointers bypass aliasing rules, but accessing a char array through int
>*
>and long * pointers doesn't?
It doesn't bypass aliasing rules but instead stores change the dynamic type of memory.
But the tests case is invalid for reasons of alignment, I'll adjust it accordingly before committing.
Richard.
>
>Bernd