diff options
author | dim <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 36c49e3f258dced101949edabd72e9bc3f1dedc4 (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/CodeGen/vector.c | |
parent | fc84956ac8b7cd244ef30e7a4d4d38a58dec5904 (diff) | |
download | FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.zip FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.tar.gz |
Vendor import of clang r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020
Approved by: rpaulo (mentor)
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 c16d65b..3fa5f14 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 |