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
3.0 KiB
C
65 lines
3.0 KiB
C
// RUN: %clang_cc1 -triple riscv32 -target-feature +zbkx -fclangir -emit-cir %s -o - | FileCheck %s --check-prefix=CIR32
|
|
// RUN: %clang_cc1 -triple riscv64 -target-feature +zbkx -fclangir -emit-cir %s -o - | FileCheck %s --check-prefix=CIR64
|
|
// RUN: %clang_cc1 -triple riscv32 -target-feature +zbkx -fclangir -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM32
|
|
// RUN: %clang_cc1 -triple riscv64 -target-feature +zbkx -fclangir -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM64
|
|
// RUN: %clang_cc1 -triple riscv32 -target-feature +zbkx -emit-llvm %s -o - | FileCheck %s --check-prefix=OGCG32
|
|
// RUN: %clang_cc1 -triple riscv64 -target-feature +zbkx -emit-llvm %s -o - | FileCheck %s --check-prefix=OGCG64
|
|
|
|
#if __riscv_xlen == 32
|
|
// CIR32-LABEL: cir.func{{.*}} @test_builtin_xperm4_32(
|
|
// CIR32: {{%.*}} = cir.call_llvm_intrinsic "riscv.xperm4" {{%.*}}, {{%.*}} : (!u32i, !u32i) -> !u32i
|
|
// CIR32: cir.return
|
|
// LLVM32-LABEL: @test_builtin_xperm4_32(
|
|
// LLVM32: call i32 @llvm.riscv.xperm4.i32(i32 {{%.*}}, i32 {{%.*}})
|
|
// LLVM32: ret i32
|
|
// OGCG32-LABEL: @test_builtin_xperm4_32(
|
|
// OGCG32: call i32 @llvm.riscv.xperm4.i32(i32 {{%.*}}, i32 {{%.*}})
|
|
// OGCG32: ret i32
|
|
unsigned int test_builtin_xperm4_32(unsigned int a, unsigned int b) {
|
|
return __builtin_riscv_xperm4_32(a, b);
|
|
}
|
|
|
|
// CIR32-LABEL: cir.func{{.*}} @test_builtin_xperm8_32(
|
|
// CIR32: {{%.*}} = cir.call_llvm_intrinsic "riscv.xperm8" {{%.*}}, {{%.*}} : (!u32i, !u32i) -> !u32i
|
|
// CIR32: cir.return
|
|
// LLVM32-LABEL: @test_builtin_xperm8_32(
|
|
// LLVM32: call i32 @llvm.riscv.xperm8.i32(i32 {{%.*}}, i32 {{%.*}})
|
|
// LLVM32: ret i32
|
|
// OGCG32-LABEL: @test_builtin_xperm8_32(
|
|
// OGCG32: call i32 @llvm.riscv.xperm8.i32(i32 {{%.*}}, i32 {{%.*}})
|
|
// OGCG32: ret i32
|
|
unsigned int test_builtin_xperm8_32(unsigned int a, unsigned int b) {
|
|
return __builtin_riscv_xperm8_32(a, b);
|
|
}
|
|
#endif
|
|
|
|
#if __riscv_xlen == 64
|
|
// CIR64-LABEL: cir.func{{.*}} @test_builtin_xperm4_64(
|
|
// CIR64: {{%.*}} = cir.call_llvm_intrinsic "riscv.xperm4" {{%.*}}, {{%.*}} : (!u64i, !u64i) -> !u64i
|
|
// CIR64: cir.return
|
|
// LLVM64-LABEL: @test_builtin_xperm4_64(
|
|
// LLVM64: call i64 @llvm.riscv.xperm4.i64(i64 {{%.*}}, i64 {{%.*}})
|
|
// LLVM64: ret i64
|
|
// OGCG64-LABEL: @test_builtin_xperm4_64(
|
|
// OGCG64: call i64 @llvm.riscv.xperm4.i64(i64 {{%.*}}, i64 {{%.*}})
|
|
// OGCG64: ret i64
|
|
unsigned long long test_builtin_xperm4_64(unsigned long long a,
|
|
unsigned long long b) {
|
|
return __builtin_riscv_xperm4_64(a, b);
|
|
}
|
|
|
|
// CIR64-LABEL: cir.func{{.*}} @test_builtin_xperm8_64(
|
|
// CIR64: {{%.*}} = cir.call_llvm_intrinsic "riscv.xperm8" {{%.*}}, {{%.*}} : (!u64i, !u64i) -> !u64i
|
|
// CIR64: cir.return
|
|
// LLVM64-LABEL: @test_builtin_xperm8_64(
|
|
// LLVM64: call i64 @llvm.riscv.xperm8.i64(i64 {{%.*}}, i64 {{%.*}})
|
|
// LLVM64: ret i64
|
|
// OGCG64-LABEL: @test_builtin_xperm8_64(
|
|
// OGCG64: call i64 @llvm.riscv.xperm8.i64(i64 {{%.*}}, i64 {{%.*}})
|
|
// OGCG64: ret i64
|
|
unsigned long long test_builtin_xperm8_64(unsigned long long a,
|
|
unsigned long long b) {
|
|
return __builtin_riscv_xperm8_64(a, b);
|
|
}
|
|
#endif
|