From: Richard Guenther <rguent...@suse.de>
Date: Fri, 18 May 2012 11:48:55 +0200 (CEST)

> On Thu, 17 May 2012, David Miller wrote:
> 
>> 
>> Richard, I was looking into a testsuite failure on the 4.7 branch
>> on sparc and I think your fix for 52584 would fix it too.
>> 
>> The problem eminates in gcc.c-torture/execute/vector-shift2.c with -O0
>> 
>> The 4 integer vector shifts get lowered to 2 integer vector shifts,
>> since that is what the VIS3 shifts are capable of.
>> 
>> However, type_for_widest_vector_mode does not take the signedness into
>> consideration.  So:
>> 
>>      signed_vector >> unsigned_vector
>> 
>> gets lowered into:
>> 
>>      unsigned_vector >> unsigned_vector
>> 
>> since type_for_widest_vector_mode unconditionally always passes
>> '1' for "unsignedp", and thus the testcase aborts since we use
>> a logical shift instead of an arithmetic one.
>> 
>> I came up with the crude fix below, but then I noticed in mainline
>> the change you made in order to resolve 52584.
> 
> Backporting that change is fine with me if you can take care to
> do the bootstrap & testing on the 4.7 branch.

Great, I'll start doing that right now.

Reply via email to