diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-05-18 14:29:55 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-05-18 14:29:55 +0000 |
commit | 519c78f3ae4f2619f67368f29b6e257f6307a8af (patch) | |
tree | 619d1848e246076e8984a33b1645907a2f19aa6e /clang/test | |
parent | b4c3c38276cfdf0bf4d101c1574827e12995732a (diff) | |
download | bcm5719-llvm-519c78f3ae4f2619f67368f29b6e257f6307a8af.tar.gz bcm5719-llvm-519c78f3ae4f2619f67368f29b6e257f6307a8af.zip |
[X86][SSE42] Sync with llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
llvm-svn: 269931
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/sse42-builtins.c | 68 |
1 files changed, 26 insertions, 42 deletions
diff --git a/clang/test/CodeGen/sse42-builtins.c b/clang/test/CodeGen/sse42-builtins.c index e3215ddaf72..00f7ff93afe 100644 --- a/clang/test/CodeGen/sse42-builtins.c +++ b/clang/test/CodeGen/sse42-builtins.c @@ -6,134 +6,118 @@ #include <x86intrin.h> -__m128i test_mm_cmpgt_epi8(__m128i A, __m128i B) { - // CHECK-LABEL: test_mm_cmpgt_epi8 - // CHECK: icmp sgt <16 x i8> - return _mm_cmpgt_epi8(A, B); -} - -__m128i test_mm_cmpgt_epi16(__m128i A, __m128i B) { - // CHECK-LABEL: test_mm_cmpgt_epi16 - // CHECK: icmp sgt <8 x i16> - return _mm_cmpgt_epi16(A, B); -} - -__m128i test_mm_cmpgt_epi32(__m128i A, __m128i B) { - // CHECK-LABEL: test_mm_cmpgt_epi32 - // CHECK: icmp sgt <4 x i32> - return _mm_cmpgt_epi32(A, B); -} - -__m128i test_mm_cmpgt_epi64(__m128i A, __m128i B) { - // CHECK-LABEL: test_mm_cmpgt_epi64 - // CHECK: icmp sgt <2 x i64> - return _mm_cmpgt_epi64(A, B); -} +// NOTE: This should match the tests in llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll int test_mm_cmpestra(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestra - // CHECK: @llvm.x86.sse42.pcmpestria128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestra(A, LA, B, LB, 7); } int test_mm_cmpestrc(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestrc - // CHECK: @llvm.x86.sse42.pcmpestric128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestrc(A, LA, B, LB, 7); } int test_mm_cmpestri(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestri - // CHECK: @llvm.x86.sse42.pcmpestri128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestri(A, LA, B, LB, 7); } __m128i test_mm_cmpestrm(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestrm - // CHECK: @llvm.x86.sse42.pcmpestrm128 + // CHECK: call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestrm(A, LA, B, LB, 7); } int test_mm_cmpestro(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestro - // CHECK: @llvm.x86.sse42.pcmpestrio128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestro(A, LA, B, LB, 7); } int test_mm_cmpestrs(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestrs - // CHECK: @llvm.x86.sse42.pcmpestris128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestrs(A, LA, B, LB, 7); } int test_mm_cmpestrz(__m128i A, int LA, __m128i B, int LB) { // CHECK-LABEL: test_mm_cmpestrz - // CHECK: @llvm.x86.sse42.pcmpestriz128 + // CHECK: call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %{{.*}}, i32 %{{.*}}, <16 x i8> %{{.*}}, i32 %{{.*}}, i8 7) return _mm_cmpestrz(A, LA, B, LB, 7); } +__m128i test_mm_cmpgt_epi64(__m128i A, __m128i B) { + // CHECK-LABEL: test_mm_cmpgt_epi64 + // CHECK: icmp sgt <2 x i64> + return _mm_cmpgt_epi64(A, B); +} + int test_mm_cmpistra(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistra - // CHECK: @llvm.x86.sse42.pcmpistria128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistra(A, B, 7); } int test_mm_cmpistrc(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistrc - // CHECK: @llvm.x86.sse42.pcmpistric128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistrc(A, B, 7); } int test_mm_cmpistri(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistri - // CHECK: @llvm.x86.sse42.pcmpistri128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistri(A, B, 7); } __m128i test_mm_cmpistrm(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistrm - // CHECK: @llvm.x86.sse42.pcmpistrm128 + // CHECK: call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistrm(A, B, 7); } int test_mm_cmpistro(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistro - // CHECK: @llvm.x86.sse42.pcmpistrio128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistro(A, B, 7); } int test_mm_cmpistrs(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistrs - // CHECK: @llvm.x86.sse42.pcmpistris128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistrs(A, B, 7); } int test_mm_cmpistrz(__m128i A, __m128i B) { // CHECK-LABEL: test_mm_cmpistrz - // CHECK: @llvm.x86.sse42.pcmpistriz128 + // CHECK: call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, i8 7) return _mm_cmpistrz(A, B, 7); } unsigned int test_mm_crc32_u8(unsigned int CRC, unsigned char V) { // CHECK-LABEL: test_mm_crc32_u8 - // CHECK: call i32 @llvm.x86.sse42.crc32.32.8 + // CHECK: call i32 @llvm.x86.sse42.crc32.32.8(i32 %{{.*}}, i8 %{{.*}}) return _mm_crc32_u8(CRC, V); } unsigned int test_mm_crc32_u16(unsigned int CRC, unsigned short V) { // CHECK-LABEL: test_mm_crc32_u16 - // CHECK: call i32 @llvm.x86.sse42.crc32.32.16 + // CHECK: call i32 @llvm.x86.sse42.crc32.32.16(i32 %{{.*}}, i16 %{{.*}}) return _mm_crc32_u16(CRC, V); } unsigned int test_mm_crc32_u32(unsigned int CRC, unsigned int V) { // CHECK-LABEL: test_mm_crc32_u32 - // CHECK: call i32 @llvm.x86.sse42.crc32.32.32 + // CHECK: call i32 @llvm.x86.sse42.crc32.32.32(i32 %{{.*}}, i32 %{{.*}}) return _mm_crc32_u32(CRC, V); } -unsigned int test_mm_crc32_u64(unsigned long long CRC, unsigned long long V) { +unsigned long long test_mm_crc32_u64(unsigned long long CRC, unsigned long long V) { // CHECK-LABEL: test_mm_crc32_u64 - // CHECK: call i64 @llvm.x86.sse42.crc32.64.64 + // CHECK: call i64 @llvm.x86.sse42.crc32.64.64(i64 %{{.*}}, i64 %{{.*}}) return _mm_crc32_u64(CRC, V); } |