| 1 |
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -flax-vector-conversions=none -o - | FileCheck %s |
| 2 |
|
| 3 |
|
| 4 |
#include <immintrin.h> |
| 5 |
|
| 6 |
__m128i test_sha1rnds4(__m128i a, __m128i b) { |
| 7 |
// CHECK: call <4 x i32> @llvm.x86.sha1rnds4 |
| 8 |
return _mm_sha1rnds4_epu32(a, b, 3); |
| 9 |
} |
| 10 |
__m128i test_sha1nexte(__m128i a, __m128i b) { |
| 11 |
// CHECK: call <4 x i32> @llvm.x86.sha1nexte |
| 12 |
return _mm_sha1nexte_epu32(a, b); |
| 13 |
} |
| 14 |
__m128i test_sha1msg1(__m128i a, __m128i b) { |
| 15 |
// CHECK: call <4 x i32> @llvm.x86.sha1msg1 |
| 16 |
return _mm_sha1msg1_epu32(a, b); |
| 17 |
} |
| 18 |
__m128i test_sha1msg2(__m128i a, __m128i b) { |
| 19 |
// CHECK: call <4 x i32> @llvm.x86.sha1msg2 |
| 20 |
return _mm_sha1msg2_epu32(a, b); |
| 21 |
} |
| 22 |
__m128i test_sha256rnds2(__m128i a, __m128i b, __m128i c) { |
| 23 |
// CHECK: call <4 x i32> @llvm.x86.sha256rnds2 |
| 24 |
return _mm_sha256rnds2_epu32(a, b, c); |
| 25 |
} |
| 26 |
__m128i test_sha256msg1(__m128i a, __m128i b) { |
| 27 |
// CHECK: call <4 x i32> @llvm.x86.sha256msg1 |
| 28 |
return _mm_sha256msg1_epu32(a, b); |
| 29 |
} |
| 30 |
__m128i test_sha256msg2(__m128i a, __m128i b) { |
| 31 |
// CHECK: call <4 x i32> @llvm.x86.sha256msg2 |
| 32 |
return _mm_sha256msg2_epu32(a, b); |
| 33 |
} |