[RTL, i386] Use subreg instead of UNSPEC_CAST
Wed Mar 20 15:54:00 GMT 2013
On Wed, 20 Mar 2013, Richard Biener wrote:
> On Wed, Mar 20, 2013 at 4:29 PM, Marc Glisse <email@example.com> wrote:
>> On Wed, 20 Mar 2013, Richard Henderson wrote:
>>> On 03/20/2013 08:00 AM, Marc Glisse wrote:
>>>> Do you at least agree that vector-vector subregs make sense, or is that
>>>> wrong as well?
>>> You mean a V4SImode subreg of a V8SImode register, not just same-size
>> I am mostly interested in the reverse, a paradoxical subreg, since
>> vec_select can only model one direction (and only rvalues, but that's a
>> different question).
There is already some of that in various places, and there may be even
more vec_merge+vec_duplicate patterns soon, but you want to make sure you
don't actually do the duplication.
> Honestly, what semantics should _mm256_castpd128_pd256 have if
> it is supposed to cast a v2df to a v4df?
NOP. We don't care what is in the high part of the vector.
> Or what use?
Many vector operations are defined as taking 2 vectors and merging them
somehow. I didn't check if this case works, but for instance if you want
to copy a V2DF to the bottom part of a V4DF using Intel's intrinsics, you
will probably have to cast the V2DF to a V4DF and then use an intrinsic
that takes 2 V4DF. (there are many issues with those intrinsics, but we
don't control them)
More information about the Gcc-patches