Craig Topper | 239c030 | 2012-06-10 00:39:38 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +xop -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 <x86intrin.h> |
| 7 | |
| 8 | __m128i test_mm_maccs_epi16(__m128i a, __m128i b, __m128i c) { |
| 9 | // CHECK: @llvm.x86.xop.vpmacssww |
| 10 | return _mm_maccs_epi16(a, b, c); |
| 11 | } |
| 12 | |
| 13 | __m128i test_mm_macc_epi16(__m128i a, __m128i b, __m128i c) { |
| 14 | // CHECK: @llvm.x86.xop.vpmacsww |
| 15 | return _mm_macc_epi16(a, b, c); |
| 16 | } |
| 17 | |
| 18 | __m128i test_mm_maccsd_epi16(__m128i a, __m128i b, __m128i c) { |
| 19 | // CHECK: @llvm.x86.xop.vpmacsswd |
| 20 | return _mm_maccsd_epi16(a, b, c); |
| 21 | } |
| 22 | |
| 23 | __m128i test_mm_maccd_epi16(__m128i a, __m128i b, __m128i c) { |
| 24 | // CHECK: @llvm.x86.xop.vpmacswd |
| 25 | return _mm_maccd_epi16(a, b, c); |
| 26 | } |
| 27 | |
| 28 | __m128i test_mm_maccs_epi32(__m128i a, __m128i b, __m128i c) { |
| 29 | // CHECK: @llvm.x86.xop.vpmacssdd |
| 30 | return _mm_maccs_epi32(a, b, c); |
| 31 | } |
| 32 | |
| 33 | __m128i test_mm_macc_epi32(__m128i a, __m128i b, __m128i c) { |
| 34 | // CHECK: @llvm.x86.xop.vpmacsdd |
| 35 | return _mm_macc_epi32(a, b, c); |
| 36 | } |
| 37 | |
| 38 | __m128i test_mm_maccslo_epi32(__m128i a, __m128i b, __m128i c) { |
| 39 | // CHECK: @llvm.x86.xop.vpmacssdql |
| 40 | return _mm_maccslo_epi32(a, b, c); |
| 41 | } |
| 42 | |
| 43 | __m128i test_mm_macclo_epi32(__m128i a, __m128i b, __m128i c) { |
| 44 | // CHECK: @llvm.x86.xop.vpmacsdql |
| 45 | return _mm_macclo_epi32(a, b, c); |
| 46 | } |
| 47 | |
| 48 | __m128i test_mm_maccshi_epi32(__m128i a, __m128i b, __m128i c) { |
| 49 | // CHECK: @llvm.x86.xop.vpmacssdqh |
| 50 | return _mm_maccshi_epi32(a, b, c); |
| 51 | } |
| 52 | |
| 53 | __m128i test_mm_macchi_epi32(__m128i a, __m128i b, __m128i c) { |
| 54 | // CHECK: @llvm.x86.xop.vpmacsdqh |
| 55 | return _mm_macchi_epi32(a, b, c); |
| 56 | } |
| 57 | |
| 58 | __m128i test_mm_maddsd_epi16(__m128i a, __m128i b, __m128i c) { |
| 59 | // CHECK: @llvm.x86.xop.vpmadcsswd |
| 60 | return _mm_maddsd_epi16(a, b, c); |
| 61 | } |
| 62 | |
| 63 | __m128i test_mm_maddd_epi16(__m128i a, __m128i b, __m128i c) { |
| 64 | // CHECK: @llvm.x86.xop.vpmadcswd |
| 65 | return _mm_maddd_epi16(a, b, c); |
| 66 | } |