This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: DSE replace_read revisited
"Andrew Pinski" <pinskia@gmail.com> writes:
> On 10/28/07, Richard Sandiford <rsandifo@nildram.co.uk> wrote:
>> (4) The code requires the store and read to have the same mode class:
>>
>> if (GET_MODE_CLASS (read_mode) != GET_MODE_CLASS (store_mode))
>> return false;
>>
>> This seems unnecessarily restrictive. I guess it was meant to
>> be a simplifying assumption, but as per (1) and (2) above,
>> it isn't really.
>
> Does this part fix PR 33927 where we have V4SI and V4SF?
It should, subject to MODES_TIEABLE_P allowing the necessary mode changes
(to and from TImode in this case).
It appears from validate_subreg that direct subregs between V4SI and
V4SF are allowed, so we could also add an extra case to extract_low_bits:
if (GET_MODE_BITSIZE (mode) == GET_MODE_BITSIZE (src_mode)
&& MODES_TIEABLE_P (mode, src_mode))
{
rtx x = gen_lowpart (mode, src);
if (x)
return x;
}
Someone with access to powerpc64-linux-gnu or spu-elf might like
to try that.
Richard