This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]