blob: 88f8c242e8801436b7f54776357657e161b1d6e8 [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'extractelement'
2// RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'insertelement'
Nate Begemanbd339f72009-10-18 21:04:35 +00003// RUN: clang-cc %s -x cl -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}
Nate Begemanbd339f72009-10-18 21:04:35 +000016
17float4 test3(float4 V1, float4 V2) { return (float4)(V1.zw, V2.xy); }