diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/CodeGen/vector.c | |
parent | a0482fa4e7fa27b01184f938097f0666b78016dd (diff) |
Diffstat (limited to 'test/CodeGen/vector.c')
-rw-r--r-- | test/CodeGen/vector.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c index c16d65bebec20..3fa5f1441d2fd 100644 --- a/test/CodeGen/vector.c +++ b/test/CodeGen/vector.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -target-cpu pentium4 -g -emit-llvm %s -o - +// RUN: %clang_cc1 -triple i386-apple-darwin9 -O1 -target-cpu pentium4 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s typedef short __v4hi __attribute__ ((__vector_size__ (8))); void test1() { @@ -20,6 +20,8 @@ void test3 ( vec4* a, char b, float c ) { +// Don't include mm_malloc.h, it's system specific. +#define __MM_MALLOC_H #include <mmintrin.h> @@ -40,3 +42,16 @@ int test4(int argc, char *argv[]) { return result; } + +#include <smmintrin.h> + +unsigned long test_epi8(__m128i x) { return _mm_extract_epi8(x, 4); } +// CHECK: @test_epi8 +// CHECK: extractelement <16 x i8> {{.*}}, i32 4 +// CHECK: zext i8 {{.*}} to i32 + +unsigned long test_epi16(__m128i x) { return _mm_extract_epi16(x, 3); } + +// CHECK: @test_epi16 +// CHECK: extractelement <8 x i16> {{.*}}, i32 3 +// CHECK: zext i16 {{.*}} to i32 |