Nate Begeman | ce5818a | 2009-12-14 04:57:03 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc %s -triple=i686-apple-darwin -target-feature +ssse3 -O1 -S -o - | FileCheck %s |
| 2 | |
| 3 | #define _mm_alignr_epi8(a, b, n) (__builtin_ia32_palignr128((a), (b), (n))) |
| 4 | typedef __attribute__((vector_size(16))) int int4; |
| 5 | |
| 6 | // CHECK: palignr |
| 7 | int4 align1(int4 a, int4 b) { return _mm_alignr_epi8(a, b, 15); } |
| 8 | // CHECK: ret |
| 9 | // CHECK: ret |
| 10 | // CHECK-NOT: palignr |
| 11 | int4 align2(int4 a, int4 b) { return _mm_alignr_epi8(a, b, 16); } |
| 12 | // CHECK: psrldq |
| 13 | int4 align3(int4 a, int4 b) { return _mm_alignr_epi8(a, b, 17); } |
| 14 | // CHECK: xorps |
| 15 | int4 align4(int4 a, int4 b) { return _mm_alignr_epi8(a, b, 32); } |