Vector code

From the cellspu's test harnesses:

define <4 x float> @fp_add_vec(<4 x float> %arg1, <4 x float> %arg2) {
%A = add <4 x float> %arg1, %arg2
ret <4 x float> %A
}

It's a simple vector add for two v4f32 quantities. There are things you need to do in order to make the optimizer not optimize, e.g.:

v4f32 fp_add_vec(v4f32 arg1, v4f32 arg2) {
return arg1 + arg2;
}

Hope this helps.

-scooter

Nicolas Capens wrote: