This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: expansion of vector shifts...
From: Richard Biener <richard.guenther@gmail.com>
Date: Wed, 13 Feb 2013 12:15:13 +0100
> On Tue, Feb 12, 2013 at 11:31 PM, David Miller <davem@davemloft.net> wrote:
>> Maybe what we really mean to do here is check both op1 and SUBREG_REG
>> (op1) against SCALAR_INT_MODE_P instead of INTEGRAL_MODE_P?
>
> Yes.
Ok, I'll commit this after doing some regstraps, thanks.
>> Something like this:
>>
>> gcc/
>>
>> 2013-02-12 David S. Miller <davem@davemloft.net>
>>
>> * expmed.c (expand_shift_1): Only strip scalar integer subregs.
>>
>> diff --git a/gcc/expmed.c b/gcc/expmed.c
>> index 4a6ddb0..954a360 100644
>> --- a/gcc/expmed.c
>> +++ b/gcc/expmed.c
>> @@ -2116,8 +2116,8 @@ expand_shift_1 (enum tree_code code, enum machine_mode mode, rtx shifted,
>> % GET_MODE_BITSIZE (mode));
>> else if (GET_CODE (op1) == SUBREG
>> && subreg_lowpart_p (op1)
>> - && INTEGRAL_MODE_P (GET_MODE (SUBREG_REG (op1)))
>> - && INTEGRAL_MODE_P (GET_MODE (op1)))
>> + && SCALAR_INT_MODE_P (GET_MODE (SUBREG_REG (op1)))
>> + && SCALAR_INT_MODE_P (GET_MODE (op1)))
>> op1 = SUBREG_REG (op1);
>> }
>>
>>
>>
>