[cfe-commits] r138422 - /cfe/trunk/test/CodeGen/avx-shuffle-builtins.c

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Aug 23 18:35:05 PDT 2011


Author: bruno
Date: Tue Aug 23 20:35:04 2011
New Revision: 138422

URL: http://llvm.org/viewvc/llvm-project?rev=138422&view=rev
Log:
Add testcase for r138411

Added:
    cfe/trunk/test/CodeGen/avx-shuffle-builtins.c

Added: cfe/trunk/test/CodeGen/avx-shuffle-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx-shuffle-builtins.c?rev=138422&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/avx-shuffle-builtins.c (added)
+++ cfe/trunk/test/CodeGen/avx-shuffle-builtins.c Tue Aug 23 20:35:04 2011
@@ -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 <immintrin.h>
+
+//
+// Test LLVM IR codegen of shuffle instructions
+//
+
+__m256 x(__m256 a, __m256 b) {
+  // Check if the mask is correct
+  // CHECK: shufflevector{{.*}}<i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15>
+  return _mm256_shuffle_ps(a, b, 203);
+}





More information about the cfe-commits mailing list