diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-08-23 16:19:38 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-08-23 16:19:38 +0000 |
| commit | 503976ad9a26bebc44e37261919a76694f96d7dd (patch) | |
| tree | a1b2001138ffec4e0ee6b08fa237bd2f3e5da0b6 /clang | |
| parent | 2a7049abe0ad0ff5c92386fad3cbc90f65cb6788 (diff) | |
| download | bcm5719-llvm-503976ad9a26bebc44e37261919a76694f96d7dd.tar.gz bcm5719-llvm-503976ad9a26bebc44e37261919a76694f96d7dd.zip | |
Added missing tests for SSE41 pmovsx/pmovzx extension intrinsics
llvm-svn: 245815
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/CodeGen/sse-builtins.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/clang/test/CodeGen/sse-builtins.c b/clang/test/CodeGen/sse-builtins.c index 6d66cca24f3..45c2c12448e 100644 --- a/clang/test/CodeGen/sse-builtins.c +++ b/clang/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> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16> 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); +} |

