brintos

brintos / llvm-project-archived public Read only

0
0
Text · 555 B · ee88ba3 Raw
18 lines · plain
1// RUN: %clang_cc1 %s -cl-opt-disable -emit-llvm -o - | not grep 'extractelement'2// RUN: %clang_cc1 %s -cl-opt-disable -emit-llvm -o - | not grep 'insertelement'3// RUN: %clang_cc1 %s -cl-opt-disable -emit-llvm -o - | grep 'shufflevector'4 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}16 17float4 test3(float4 V1, float4 V2) { return (float4)(V1.zw, V2.xy); }18