This is the mail archive of the 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: Altivec strangeness?

>> that, wean them off of the {1} stuff.  that just goes against
>> C syntax.
> It does, but how we one be able to represent a constant vector of
> common values without typing them all? This is

there's no precedence in C for this.  it goes against the grain.

> a) nasty because it requires a lot of typing.

declare a macro:

	#define VSHORT_1S ((vector short int){1,1,1,1,1,1,1,1})

> b) not the fastest way because it will take memory and be loaded into
>    memory while splatting might be faster and schedule better.

as i have mentioned before, the vector initializers generate pretty
bad code, but that will be remedied when, in 3.2, i rewrite them
to use the vector constant infrastructure.  right now, they just
get initialized as arrays, which is less than optimal.

in the code's defense, how many times do you initialize a given
vector in a function?  once!  it's not like it's going to drag
performance down.  and if you have it in a loop, it's probably
invariant, so move it out of it.

let's concentrate on getting the bugs ironed out of the current
implementation, and then we can tackle code quality issues.

Aldy Hernandez                                E-mail:
Professional Gypsy Lost in Australia
Red Hat, Inc.

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