blob: 37d3ed42d060143eb9b3c3e4950f65eb2b6575d9 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement'
2// RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement'
3// RUN: clang-cc %s -emit-llvm -o - | grep 'shufflevector'
Nate Begeman6fe7c8a2009-01-18 06:42:49 +00004
5typedef __attribute__(( ext_vector_type(2) )) float float2;
6typedef __attribute__(( ext_vector_type(4) )) float float4;
7
8float2 test1(float4 V) {
9 return V.xy + V.wz;
10}
11
12float4 test2(float4 V) {
13 float2 W = V.ww;
14 return W.xyxy + W.yxyx;
15}