diff options
author | Craig Topper <craig.topper@gmail.com> | 2011-12-20 09:55:26 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2011-12-20 09:55:26 +0000 |
commit | 4c07c5dfebd270b2f0660e86f056eeafdb26a4fb (patch) | |
tree | 3c21d6c3d721e66804b3ae1ea2818735b4b740f2 /test | |
parent | 3ff53b3587862439a1a84a7b0bc9a7dbee0cf4eb (diff) |
Add AVX2 intrinsics for pavg, pblend, and pcmp instructions. Also remove unneeded builtins for SSE pcmp. Change SSE pcmpeqq and pcmpgtq to not use builtins and just use vector == and >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/avx2-builtins.c | 60 | ||||
-rw-r--r-- | test/CodeGen/builtins-x86.c | 6 |
2 files changed, 60 insertions, 6 deletions
diff --git a/test/CodeGen/avx2-builtins.c b/test/CodeGen/avx2-builtins.c index 3aa374e448..aa13b3c268 100644 --- a/test/CodeGen/avx2-builtins.c +++ b/test/CodeGen/avx2-builtins.c @@ -155,3 +155,63 @@ __m256 test_mm256_xor_si256(__m256 a, __m256 b) { // CHECK: xor <4 x i64> return _mm256_xor_si256(a, b); } + +__m256 test_mm256_avg_epu8(__m256 a, __m256 b) { + // CHECK: @llvm.x86.avx2.pavg.b + return _mm256_avg_epu8(a, b); +} + +__m256 test_mm256_avg_epu16(__m256 a, __m256 b) { + // CHECK: @llvm.x86.avx2.pavg.w + return _mm256_avg_epu16(a, b); +} + +__m256 test_mm256_blendv_epi8(__m256 a, __m256 b, __m256 m) { + // CHECK: @llvm.x86.avx2.pblendvb + return _mm256_blendv_epi8(a, b, m); +} + +__m256 test_mm256_blend_epi16(__m256 a, __m256 b) { + // CHECK: @llvm.x86.avx2.pblendw(<16 x i16> %{{.*}}, <16 x i16> %{{.*}}, i32 2) + return _mm256_blend_epi16(a, b, 2); +} + +__m256 test_mm256_cmpeq_epi8(__m256 a, __m256 b) { + // CHECK: icmp eq <32 x i8> + return _mm256_cmpeq_epi8(a, b); +} + +__m256 test_mm256_cmpeq_epi16(__m256 a, __m256 b) { + // CHECK: icmp eq <16 x i16> + return _mm256_cmpeq_epi16(a, b); +} + +__m256 test_mm256_cmpeq_epi32(__m256 a, __m256 b) { + // CHECK: icmp eq <8 x i32> + return _mm256_cmpeq_epi32(a, b); +} + +__m256 test_mm256_cmpeq_epi64(__m256 a, __m256 b) { + // CHECK: icmp eq <4 x i64> + return _mm256_cmpeq_epi64(a, b); +} + +__m256 test_mm256_cmpgt_epi8(__m256 a, __m256 b) { + // CHECK: icmp sgt <32 x i8> + return _mm256_cmpgt_epi8(a, b); +} + +__m256 test_mm256_cmpgt_epi16(__m256 a, __m256 b) { + // CHECK: icmp sgt <16 x i16> + return _mm256_cmpgt_epi16(a, b); +} + +__m256 test_mm256_cmpgt_epi32(__m256 a, __m256 b) { + // CHECK: icmp sgt <8 x i32> + return _mm256_cmpgt_epi32(a, b); +} + +__m256 test_mm256_cmpgt_epi64(__m256 a, __m256 b) { + // CHECK: icmp sgt <4 x i64> + return _mm256_cmpgt_epi64(a, b); +} diff --git a/test/CodeGen/builtins-x86.c b/test/CodeGen/builtins-x86.c index 7f028e5932..772ab105db 100644 --- a/test/CodeGen/builtins-x86.c +++ b/test/CodeGen/builtins-x86.c @@ -199,12 +199,6 @@ void f0() { tmp_V8s = __builtin_ia32_pmulhw128(tmp_V8s, tmp_V8s); tmp_V16c = __builtin_ia32_pavgb128(tmp_V16c, tmp_V16c); tmp_V8s = __builtin_ia32_pavgw128(tmp_V8s, tmp_V8s); - tmp_V16c = __builtin_ia32_pcmpeqb128(tmp_V16c, tmp_V16c); - tmp_V8s = __builtin_ia32_pcmpeqw128(tmp_V8s, tmp_V8s); - tmp_V4i = __builtin_ia32_pcmpeqd128(tmp_V4i, tmp_V4i); - tmp_V16c = __builtin_ia32_pcmpgtb128(tmp_V16c, tmp_V16c); - tmp_V8s = __builtin_ia32_pcmpgtw128(tmp_V8s, tmp_V8s); - tmp_V4i = __builtin_ia32_pcmpgtd128(tmp_V4i, tmp_V4i); tmp_V16c = __builtin_ia32_pmaxub128(tmp_V16c, tmp_V16c); tmp_V8s = __builtin_ia32_pmaxsw128(tmp_V8s, tmp_V8s); tmp_V16c = __builtin_ia32_pminub128(tmp_V16c, tmp_V16c); |