Craig Topper | 2ee2ac2 | 2012-01-25 04:26:17 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s |
| 2 | |
| 3 | // Don't include mm_malloc.h, it's system specific. |
| 4 | #define __MM_MALLOC_H |
| 5 | |
| 6 | #include <immintrin.h> |
| 7 | |
| 8 | // |
| 9 | // Test LLVM IR codegen of shuffle instructions |
| 10 | // |
| 11 | |
| 12 | __m256 test__mm256_loadu_ps(void* p) { |
Chris Lattner | 9eb10cc | 2012-01-25 05:29:46 +0000 | [diff] [blame^] | 13 | // CHECK: load <8 x float>* %{{.*}}, align 1 |
Craig Topper | 2ee2ac2 | 2012-01-25 04:26:17 +0000 | [diff] [blame] | 14 | return _mm256_loadu_ps(p); |
| 15 | } |
| 16 | |
| 17 | __m256d test__mm256_loadu_pd(void* p) { |
Chris Lattner | 9eb10cc | 2012-01-25 05:29:46 +0000 | [diff] [blame^] | 18 | // CHECK: load <4 x double>* %{{.*}}, align 1 |
Craig Topper | 2ee2ac2 | 2012-01-25 04:26:17 +0000 | [diff] [blame] | 19 | return _mm256_loadu_pd(p); |
| 20 | } |
| 21 | |
| 22 | __m256i test__mm256_loadu_si256(void* p) { |
| 23 | // CHECK: load <4 x i64>* %0, align 1 |
| 24 | return _mm256_loadu_si256(p); |
| 25 | } |