From fbb8b84f5faba523ac714ed588d35c336db46d45 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Wed, 24 Aug 2011 01:35:04 +0000 Subject: [PATCH] Add testcase for r138411 llvm-svn: 138422 --- clang/test/CodeGen/avx-shuffle-builtins.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 clang/test/CodeGen/avx-shuffle-builtins.c diff --git a/clang/test/CodeGen/avx-shuffle-builtins.c b/clang/test/CodeGen/avx-shuffle-builtins.c new file mode 100644 index 000000000000..c11780a5e392 --- /dev/null +++ b/clang/test/CodeGen/avx-shuffle-builtins.c @@ -0,0 +1,16 @@ +// 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 x(__m256 a, __m256 b) { + // Check if the mask is correct + // CHECK: shufflevector{{.*}} + return _mm256_shuffle_ps(a, b, 203); +}