Daniel Dunbar | 025f80d | 2009-07-25 11:27:37 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement' && |
| 2 | // RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement' && |
Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 3 | // RUN: clang-cc %s -emit-llvm -o - | grep 'shufflevector' |
Nate Begeman | 6fe7c8a | 2009-01-18 06:42:49 +0000 | [diff] [blame] | 4 | |
| 5 | typedef __attribute__(( ext_vector_type(2) )) float float2; |
| 6 | typedef __attribute__(( ext_vector_type(4) )) float float4; |
| 7 | |
| 8 | float2 test1(float4 V) { |
| 9 | return V.xy + V.wz; |
| 10 | } |
| 11 | |
| 12 | float4 test2(float4 V) { |
| 13 | float2 W = V.ww; |
| 14 | return W.xyxy + W.yxyx; |
| 15 | } |