diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/CodeGen/sha-builtins.c | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/CodeGen/sha-builtins.c')
-rw-r--r-- | test/CodeGen/sha-builtins.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CodeGen/sha-builtins.c b/test/CodeGen/sha-builtins.c new file mode 100644 index 0000000..181dba1 --- /dev/null +++ b/test/CodeGen/sha-builtins.c @@ -0,0 +1,35 @@ +// RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -o - | FileCheck %s + +// Don't include mm_malloc.h, it's system specific. +#define __MM_MALLOC_H + +#include <immintrin.h> + +__m128i test_sha1rnds4(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha1rnds4 + return _mm_sha1rnds4_epu32(a, b, 8); +} +__m128i test_sha1nexte(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha1nexte + return _mm_sha1nexte_epu32(a, b); +} +__m128i test_sha1msg1(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha1msg1 + return _mm_sha1msg1_epu32(a, b); +} +__m128i test_sha1msg2(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha1msg2 + return _mm_sha1msg2_epu32(a, b); +} +__m128i test_sha256rnds2(__m128i a, __m128i b, __m128i c) { + // CHECK: call <4 x i32> @llvm.x86.sha256rnds2 + return _mm_sha256rnds2_epu32(a, b, c); +} +__m128i test_sha256msg1(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha256msg1 + return _mm_sha256msg1_epu32(a, b); +} +__m128i test_sha256msg2(__m128i a, __m128i b) { + // CHECK: call <4 x i32> @llvm.x86.sha256msg2 + return _mm_sha256msg2_epu32(a, b); +} |