From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGen/avx-builtins.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 clang/test/CodeGen/avx-builtins.c (limited to 'clang/test/CodeGen/avx-builtins.c') diff --git a/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c new file mode 100644 index 0000000..b963c97 --- /dev/null +++ b/clang/test/CodeGen/avx-builtins.c @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s + +// Don't include mm_malloc.h, it's system specific. +#define __MM_MALLOC_H + +#include + +// +// Test LLVM IR codegen of shuffle instructions +// + +__m256 test__mm256_loadu_ps(void* p) { + // CHECK: load <8 x float>* %{{.*}}, align 1 + return _mm256_loadu_ps(p); +} + +__m256d test__mm256_loadu_pd(void* p) { + // CHECK: load <4 x double>* %{{.*}}, align 1 + return _mm256_loadu_pd(p); +} + +__m256i test__mm256_loadu_si256(void* p) { + // CHECK: load <4 x i64>* %{{.+}}, align 1 + return _mm256_loadu_si256(p); +} -- cgit v1.2.3