diff options
| author | Yael Tsafrir <yael.tsafrir@intel.com> | 2017-09-12 07:46:32 +0000 |
|---|---|---|
| committer | Yael Tsafrir <yael.tsafrir@intel.com> | 2017-09-12 07:46:32 +0000 |
| commit | 23e7733230c59570a62f15beaafacb0fb680958d (patch) | |
| tree | 0e0d91115769bd8fe944afe79f28852eb0cdf069 /clang/test/CodeGen/sse2-builtins.c | |
| parent | 9df2527b0bc4d4dc20342f26df17d6130b91bf54 (diff) | |
| download | bcm5719-llvm-23e7733230c59570a62f15beaafacb0fb680958d.tar.gz bcm5719-llvm-23e7733230c59570a62f15beaafacb0fb680958d.zip | |
[X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR
Differential Revision: https://reviews.llvm.org/D37562
llvm-svn: 313011
Diffstat (limited to 'clang/test/CodeGen/sse2-builtins.c')
| -rw-r--r-- | clang/test/CodeGen/sse2-builtins.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/clang/test/CodeGen/sse2-builtins.c b/clang/test/CodeGen/sse2-builtins.c index ca51314d80b..c2279cb8810 100644 --- a/clang/test/CodeGen/sse2-builtins.c +++ b/clang/test/CodeGen/sse2-builtins.c @@ -97,13 +97,25 @@ __m128i test_mm_andnot_si128(__m128i A, __m128i B) { __m128i test_mm_avg_epu8(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_avg_epu8 - // CHECK: call <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}) + // CHECK-NOT: call <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}) + // CHECK: zext <16 x i8> %{{.*}} to <16 x i16> + // CHECK: zext <16 x i8> %{{.*}} to <16 x i16> + // CHECK: add <16 x i16> %{{.*}}, %{{.*}} + // CHECK: add <16 x i16> %{{.*}}, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> + // CHECK: lshr <16 x i16> %{{.*}}, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> + // CHECK:trunc <16 x i16> %{{.*}} to <16 x i8> return _mm_avg_epu8(A, B); } __m128i test_mm_avg_epu16(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_avg_epu16 - // CHECK: call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}) + // CHECK-NOT: call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}) + // CHECK: zext <8 x i16> %{{.*}} to <8 x i32> + // CHECK: zext <8 x i16> %{{.*}} to <8 x i32> + // CHECK: add <8 x i32> %{{.*}}, %{{.*}} + // CHECK: add <8 x i32> %{{.*}}, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> + // CHECK: lshr <8 x i32> %{{.*}}, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> + // CHECK: trunc <8 x i32> %{{.*}} to <8 x i16> return _mm_avg_epu16(A, B); } |

