Displaying 2 results from an estimated 2 matches for "vec2_2".
2008 Jun 27
0
[LLVMdev] Vector instructions
...ciently generalized shufflevector would remove the need for
> insertelement and extractelement to exist completely.
You should look into how this works with clang. Clang allows you to
do things like this, for example:
typedef __attribute__(( ext_vector_type(4) )) float float4;
float2 vec2, vec2_2;
float4 vec4, vec4_2;
float f;
void test2() {
vec2 = vec4.xy; // shorten
f = vec2.x; // extract elt
vec4 = vec4.yyyy; // splat
vec4.zw = vec2; // insert
}
etc. It also offers operators to extract all the even or odd elements
of a vector, do arbitrary two-input-vec...
2008 Jun 27
2
[LLVMdev] Vector instructions
Hi Dan,
Thanks for your comments. I've responded inline below.
On 26-Jun-08, at 6:49 PM, Dan Gohman wrote:
> On Jun 26, 2008, at 1:56 PM, Stefanus Du Toit wrote:
>>
>> ===
>> 1. Shufflevector only accepts vectors of the same type
>>
>> I would propose to change the syntax from:
>>
>>> <result> = shufflevector <n x <ty>>