rfc: convert scalar literals to vector constants

Richard Henderson rth@redhat.com
Tue Jun 3 01:37:00 GMT 2003


On Mon, Jun 02, 2003 at 03:19:22PM -0400, Aldy Hernandez wrote:
> Do we even support casting scalars into vectors?  I doubt it, but we 
> should at least make an exception for the 0 constant.

Of course we do, from scalars of the same size.  We consider it
a bit-reinterpretation operation.

> What I suggest is fixing convert_mode() to convert scalar 0 into vector 
> 0.  Is this an appropriate solution?

Yes.

> I also suggest specifying in the docs that a cast to a scalar constant 
> that is not 0 is undefined.

Um, no.  If it works on "i", it should work on "1".


r~



More information about the Gcc mailing list