This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Vector types and type conversions
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mark at codesourcery dot com (Mark Mitchell)
- Cc: pinskia at physics dot uc dot edu (Andrew Pinski), paolo dot bonzini at lu dot unisi dot ch (Paolo Bonzini), aph at redhat dot com (Andrew Haley), gcc at gcc dot gnu dot org (GCC Development)
- Date: Wed, 19 Apr 2006 12:56:45 -0400 (EDT)
- Subject: Re: Vector types and type conversions
>
> I think, like Ian, that conversions from V4SF to V4SI, via an ordinary
> cast, should perform a conversion; this should be the same as converting
> each of the individual floats to int. Then, since the bit-preserving
> conversion is also useful, we should have another syntax for that.
>
> However, the Altivec situation, coupled with the fact that
> bit-preserving conversion is our current behavior, makes me think that,
> what I might think the ideal language-design ought to be may have little
> relevance. Do people think it's viable to change the default kind of
> conversion, on targets other than Altivec?
As I mentioned, SSE code already depends on the current behavior and in
fact seems like a better behavior than actually changing the bits.
The RFC for converting scalar literals to vectors (bit preserving)
was:
http://gcc.gnu.org/ml/gcc/2003-06/msg00158.html
And the last time this was brought up was:
http://gcc.gnu.org/ml/gcc/2004-09/msg00003.html
And there was no change then, why change now and since generic vector
support has been there since at least 3.4 with a lot of the bugs
flushed out in 4.0.x.
-- Pinski