From: Simon Pilgrim Date: Sun, 23 Aug 2015 16:19:38 +0000 (+0000) Subject: Added missing tests for SSE41 pmovsx/pmovzx extension intrinsics X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a337c6497901ed85dbae5308227f6e9d23a547d;p=clang Added missing tests for SSE41 pmovsx/pmovzx extension intrinsics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245815 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/sse-builtins.c b/test/CodeGen/sse-builtins.c index 6d66cca24f..45c2c12448 100644 --- a/test/CodeGen/sse-builtins.c +++ b/test/CodeGen/sse-builtins.c @@ -577,3 +577,75 @@ __m128i test2_mm_alignr_epi8(__m128i a, __m128i b) { // CHECK: shufflevector <16 x i8> %{{.*}}, <16 x i8> zeroinitializer, <16 x i32> return _mm_alignr_epi8(a, b, 17); } + +__m128i test_mm_cvtepi8_epi16(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi8_epi16 + // CHECK: call <8 x i16> @llvm.x86.sse41.pmovsxbw(<16 x i8> {{.*}}) + return _mm_cvtepi8_epi16(a); +} + +__m128i test_mm_cvtepi8_epi32(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi8_epi32 + // CHECK: call <4 x i32> @llvm.x86.sse41.pmovsxbd(<16 x i8> {{.*}}) + return _mm_cvtepi8_epi32(a); +} + +__m128i test_mm_cvtepi8_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi8_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxbq(<16 x i8> {{.*}}) + return _mm_cvtepi8_epi64(a); +} + +__m128i test_mm_cvtepi16_epi32(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi16_epi32 + // CHECK: call <4 x i32> @llvm.x86.sse41.pmovsxwd(<8 x i16> {{.*}}) + return _mm_cvtepi16_epi32(a); +} + +__m128i test_mm_cvtepi16_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi16_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxwq(<8 x i16> {{.*}}) + return _mm_cvtepi16_epi64(a); +} + +__m128i test_mm_cvtepi32_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepi32_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovsxdq(<4 x i32> {{.*}}) + return _mm_cvtepi32_epi64(a); +} + +__m128i test_mm_cvtepu8_epi16(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu8_epi16 + // CHECK: call <8 x i16> @llvm.x86.sse41.pmovzxbw(<16 x i8> {{.*}}) + return _mm_cvtepu8_epi16(a); +} + +__m128i test_mm_cvtepu8_epi32(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu8_epi32 + // CHECK: call <4 x i32> @llvm.x86.sse41.pmovzxbd(<16 x i8> {{.*}}) + return _mm_cvtepu8_epi32(a); +} + +__m128i test_mm_cvtepu8_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu8_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovzxbq(<16 x i8> {{.*}}) + return _mm_cvtepu8_epi64(a); +} + +__m128i test_mm_cvtepu16_epi32(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu16_epi32 + // CHECK: call <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16> {{.*}}) + return _mm_cvtepu16_epi32(a); +} + +__m128i test_mm_cvtepu16_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu16_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovzxwq(<8 x i16> {{.*}}) + return _mm_cvtepu16_epi64(a); +} + +__m128i test_mm_cvtepu32_epi64(__m128i a) { + // CHECK-LABEL: @test_mm_cvtepu32_epi64 + // CHECK: call <2 x i64> @llvm.x86.sse41.pmovzxdq(<4 x i32> {{.*}}) + return _mm_cvtepu32_epi64(a); +}