fix 23714

Andrew Pinski pinskia@physics.uc.edu
Tue Oct 11 20:59:00 GMT 2005


On Oct 11, 2005, at 3:15 PM, Ulrich Weigand wrote:

> Richard Henderson wrote:
>
>> On Fri, Oct 07, 2005 at 04:00:06PM -0400, David Edelsohn wrote:
>>> 	Actually, yes.  It performs a lot of bit operations on an array
>>> rank_mask[8].
>>
>> No, sizeof(rank_mask) <= 8.  I.e. so that it fits in a DImode.
>
> I'm also seeing significant regression in 186.crafty on s390x.

For the following testcase:
#define BITBOARD long long

     union doub {
       unsigned short i[4];
       BITBOARD d;
     };

int f(BITBOARD a)
{
   return ((union doub){.d=a}).i[1];
}

and the attached patch, we get back to where we were before RTH's patch
for code generation.  Compile time I have not looked into getting that
fixed because it is much harder and you still have to walk the trees.

Note in_array_bounds_p checks to see if the index is not an INTEGER_CST
which is why I did not have to do much.  Also in_array_bounds_p is 
called
already from tree_could_trap_p which is where I got the idea from

I am testing the patch on x86_64-pc-linux-gnu as we speak.

OK? If all passes?

Thanks,
Andrew Pinski

ChangeLog:
	* tree-cfg.c (mark_array_ref_addressable_1): If the array
	reference is in bounds, don't do anything.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051011/e37c6b4e/attachment.txt>


More information about the Gcc-patches mailing list