[OpenACC] Treat 'delete' as a valid clause during parsing in C++ mode
[llvm-project.git] / clang / test / CodeGen / X86 / x86-crc-builtins.c
blob4645f7ecad5690415851be4bb16281569748b418
1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,CHECK64
2 // RUN: %clang_cc1 -ffreestanding %s -triple=i686-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | FileCheck %s
3 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +crc32 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,CHECK64
4 // RUN: %clang_cc1 -ffreestanding %s -triple=i686-apple-darwin -target-feature +crc32 -emit-llvm -o - -Wall -Werror | FileCheck %s
6 #include <x86intrin.h>
8 unsigned int test__crc32b(unsigned int CRC, unsigned char V) {
9 // CHECK-LABEL: test__crc32b
10 // CHECK: call i32 @llvm.x86.sse42.crc32.32.8(i32 %{{.*}}, i8 %{{.*}})
11 return __crc32b(CRC, V);
14 unsigned int test__crc32w(unsigned int CRC, unsigned short V) {
15 // CHECK-LABEL: test__crc32w
16 // CHECK: call i32 @llvm.x86.sse42.crc32.32.16(i32 %{{.*}}, i16 %{{.*}})
17 return __crc32w(CRC, V);
20 unsigned int test__crc32d(unsigned int CRC, unsigned int V) {
21 // CHECK-LABEL: test__crc32d
22 // CHECK: call i32 @llvm.x86.sse42.crc32.32.32(i32 %{{.*}}, i32 %{{.*}})
23 return __crc32d(CRC, V);
26 #ifdef __x86_64__
27 unsigned long long test__crc32q(unsigned long long CRC, unsigned long long V) {
28 // CHECK64-LABEL: test__crc32q
29 // CHECK64: call i64 @llvm.x86.sse42.crc32.64.64(i64 %{{.*}}, i64 %{{.*}})
30 return __crc32q(CRC, V);
32 #endif
34 unsigned int test_mm_crc32_u8(unsigned int CRC, unsigned char V) {
35 // CHECK-LABEL: test_mm_crc32_u8
36 // CHECK: call i32 @llvm.x86.sse42.crc32.32.8(i32 %{{.*}}, i8 %{{.*}})
37 return _mm_crc32_u8(CRC, V);
40 unsigned int test_mm_crc32_u16(unsigned int CRC, unsigned short V) {
41 // CHECK-LABEL: test_mm_crc32_u16
42 // CHECK: call i32 @llvm.x86.sse42.crc32.32.16(i32 %{{.*}}, i16 %{{.*}})
43 return _mm_crc32_u16(CRC, V);
46 unsigned int test_mm_crc32_u32(unsigned int CRC, unsigned int V) {
47 // CHECK-LABEL: test_mm_crc32_u32
48 // CHECK: call i32 @llvm.x86.sse42.crc32.32.32(i32 %{{.*}}, i32 %{{.*}})
49 return _mm_crc32_u32(CRC, V);
52 #ifdef __x86_64__
53 unsigned long long test_mm_crc32_u64(unsigned long long CRC, unsigned long long V) {
54 // CHECK64-LABEL: test_mm_crc32_u64
55 // CHECK64: call i64 @llvm.x86.sse42.crc32.64.64(i64 %{{.*}}, i64 %{{.*}})
56 return _mm_crc32_u64(CRC, V);
58 #endif