patch: convert scalar literals to vector constants (PR/7277)

Aldy Hernandez aldyh@redhat.com
Thu Jun 5 22:52:00 GMT 2003


>>>>> "Michael" == Michael Meissner <gcc-pat@the-meissners.org> writes:

 > 	v4qi_t dup = (v4qi_t)1;		/* 1 is duplicated into each byte */

Actually, I'm more in favor of this, since this is what other SIMD
compilers do.  And it makes more sense, instead of the nonsense we
would now create by having:

v2sf_t dup = (v2sf_t)5LL;

Casting scalars is just plain ugly, but having 5LL be converted to
5.0F and propagated to all the elements is not as bad.

Aldy



More information about the Gcc-patches mailing list