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: PATCH: PR middle-end/35897: DSE doesn't support targets with wide ?registers


H.J. Lu wrote:
On Fri, Apr 11, 2008 at 10:27:41AM -0400, Kenneth Zadeck wrote:
Hi Kenny,

My patch is at

http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00937.html

Does it look OK?

sorry, i did not see the entire patch. it does look ok.

Hi Kenny,


I have a question on DSE. There are

  store_info->positions_needed = lowpart_bitmask (width);
  store_info->group_id = group_id;
  store_info->begin = offset;
  store_info->end = offset + width;

So

store_info->begin <= offset < store_info->end

But there are 2 instances of

  && (offset >= store_info->begin)
  && (offset + width <= store_info->end)
    {
...
    }

Shouldn't they be

  && (offset >= store_info->begin)
  && (offset + width < store_info->end)
    {
...
    }

If I am correct, I can provide a patch.

Thanks


H.J.
I do not think that you are correct. This does not mean that there is not some other inconsistancy but i believe that this code is correct.

on line (before your patch) 1375 we have:
 store_info->end = offset + width;

in the two cases that you mention, if offset == store_info->begin, then offset + width will be equal to store_info->end for a full word operation. So i think that the code is correct.

i.e. if offset is 10, begin 10, and width is 1, then end will be 11 but offset + width will also be 11.

this is consistent with the loops that are for (i = store_info->begin; i < store_info->end; i++)
will only iterate 1 time - for the value 10.


Kenny


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