CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
65 lines
1.9 KiB
C
65 lines
1.9 KiB
C
// RUN: %clang_cc1 -triple armv8-none-linux-gnueabi -target-feature +crc \
|
|
// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s
|
|
// RUN: %clang_cc1 -verify -emit-llvm-only -triple armv7-none-linux-gnueabi %s
|
|
|
|
int crc32b(int a, char b)
|
|
{
|
|
// expected-error@+1 {{'__builtin_arm_crc32b' needs target feature crc}}
|
|
return __builtin_arm_crc32b(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32
|
|
// CHECK: call i32 @llvm.arm.crc32b(i32 %a, i32 [[T0]])
|
|
}
|
|
|
|
int crc32cb(int a, char b)
|
|
{
|
|
return __builtin_arm_crc32cb(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32
|
|
// CHECK: call i32 @llvm.arm.crc32cb(i32 %a, i32 [[T0]])
|
|
}
|
|
|
|
int crc32h(int a, short b)
|
|
{
|
|
return __builtin_arm_crc32h(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32
|
|
// CHECK: call i32 @llvm.arm.crc32h(i32 %a, i32 [[T0]])
|
|
}
|
|
|
|
int crc32ch(int a, short b)
|
|
{
|
|
return __builtin_arm_crc32ch(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32
|
|
// CHECK: call i32 @llvm.arm.crc32ch(i32 %a, i32 [[T0]])
|
|
}
|
|
|
|
int crc32w(int a, int b)
|
|
{
|
|
return __builtin_arm_crc32w(a,b);
|
|
// CHECK: call i32 @llvm.arm.crc32w(i32 %a, i32 %b)
|
|
}
|
|
|
|
int crc32cw(int a, int b)
|
|
{
|
|
return __builtin_arm_crc32cw(a,b);
|
|
// CHECK: call i32 @llvm.arm.crc32cw(i32 %a, i32 %b)
|
|
}
|
|
|
|
int crc32d(int a, long long b)
|
|
{
|
|
return __builtin_arm_crc32d(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = trunc i64 %b to i32
|
|
// CHECK: [[T1:%[0-9]+]] = lshr i64 %b, 32
|
|
// CHECK: [[T2:%[0-9]+]] = trunc i64 [[T1]] to i32
|
|
// CHECK: [[T3:%[0-9]+]] = call i32 @llvm.arm.crc32w(i32 %a, i32 [[T0]])
|
|
// CHECK: call i32 @llvm.arm.crc32w(i32 [[T3]], i32 [[T2]])
|
|
}
|
|
|
|
int crc32cd(int a, long long b)
|
|
{
|
|
return __builtin_arm_crc32cd(a,b);
|
|
// CHECK: [[T0:%[0-9]+]] = trunc i64 %b to i32
|
|
// CHECK: [[T1:%[0-9]+]] = lshr i64 %b, 32
|
|
// CHECK: [[T2:%[0-9]+]] = trunc i64 [[T1]] to i32
|
|
// CHECK: [[T3:%[0-9]+]] = call i32 @llvm.arm.crc32cw(i32 %a, i32 [[T0]])
|
|
// CHECK: call i32 @llvm.arm.crc32cw(i32 [[T3]], i32 [[T2]])
|
|
}
|