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
87 lines
3.4 KiB
Common Lisp
87 lines
3.4 KiB
Common Lisp
// REQUIRES: amdgpu-registered-target
|
|
// RUN: %clang_cc1 -cl-std=CL2.0 -triple amdgcn-unknown-unknown -target-cpu fiji -emit-llvm -o - %s | FileCheck -enable-var-scope --check-prefixes=CHECK %s
|
|
|
|
|
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
|
|
|
typedef unsigned long ulong;
|
|
typedef unsigned int uint;
|
|
typedef unsigned short ushort;
|
|
typedef half __attribute__((ext_vector_type(2))) half2;
|
|
typedef short __attribute__((ext_vector_type(2))) short2;
|
|
typedef ushort __attribute__((ext_vector_type(2))) ushort2;
|
|
typedef uint __attribute__((ext_vector_type(4))) uint4;
|
|
|
|
// CHECK-LABEL: @test_lerp
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.lerp
|
|
void test_lerp(global int* out, int a, int b, int c)
|
|
{
|
|
*out = __builtin_amdgcn_lerp(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cubeid(
|
|
// CHECK: {{.*}}call{{.*}} float @llvm.amdgcn.cubeid(float %a, float %b, float %c)
|
|
void test_cubeid(global float* out, float a, float b, float c) {
|
|
*out = __builtin_amdgcn_cubeid(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cubesc(
|
|
// CHECK: {{.*}}call{{.*}} float @llvm.amdgcn.cubesc(float %a, float %b, float %c)
|
|
void test_cubesc(global float* out, float a, float b, float c) {
|
|
*out = __builtin_amdgcn_cubesc(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cubetc(
|
|
// CHECK: {{.*}}call{{.*}} float @llvm.amdgcn.cubetc(float %a, float %b, float %c)
|
|
void test_cubetc(global float* out, float a, float b, float c) {
|
|
*out = __builtin_amdgcn_cubetc(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cubema(
|
|
// CHECK: {{.*}}call{{.*}} float @llvm.amdgcn.cubema(float %a, float %b, float %c)
|
|
void test_cubema(global float* out, float a, float b, float c) {
|
|
*out = __builtin_amdgcn_cubema(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cvt_pknorm_i16(
|
|
// CHECK: tail call{{.*}} <2 x i16> @llvm.amdgcn.cvt.pknorm.i16(float %src0, float %src1)
|
|
kernel void test_cvt_pknorm_i16(global short2* out, float src0, float src1) {
|
|
*out = __builtin_amdgcn_cvt_pknorm_i16(src0, src1);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_cvt_pknorm_u16(
|
|
// CHECK: tail call{{.*}} <2 x i16> @llvm.amdgcn.cvt.pknorm.u16(float %src0, float %src1)
|
|
kernel void test_cvt_pknorm_u16(global ushort2* out, float src0, float src1) {
|
|
*out = __builtin_amdgcn_cvt_pknorm_u16(src0, src1);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_sad_u8(
|
|
// CHECK: tail call{{.*}} i32 @llvm.amdgcn.sad.u8(i32 %src0, i32 %src1, i32 %src2)
|
|
kernel void test_sad_u8(global uint* out, uint src0, uint src1, uint src2) {
|
|
*out = __builtin_amdgcn_sad_u8(src0, src1, src2);
|
|
}
|
|
|
|
// CHECK-LABEL: test_msad_u8(
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.msad.u8(i32 %src0, i32 %src1, i32 %src2)
|
|
kernel void test_msad_u8(global uint* out, uint src0, uint src1, uint src2) {
|
|
*out = __builtin_amdgcn_msad_u8(src0, src1, src2);
|
|
}
|
|
|
|
// CHECK-LABEL: test_sad_hi_u8(
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.sad.hi.u8(i32 %src0, i32 %src1, i32 %src2)
|
|
kernel void test_sad_hi_u8(global uint* out, uint src0, uint src1, uint src2) {
|
|
*out = __builtin_amdgcn_sad_hi_u8(src0, src1, src2);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_sad_u16(
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.sad.u16(i32 %src0, i32 %src1, i32 %src2)
|
|
kernel void test_sad_u16(global uint* out, uint src0, uint src1, uint src2) {
|
|
*out = __builtin_amdgcn_sad_u16(src0, src1, src2);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_qsad_pk_u16_u8(
|
|
// CHECK: {{.*}}call{{.*}} i64 @llvm.amdgcn.qsad.pk.u16.u8(i64 %src0, i32 %src1, i64 %src2)
|
|
kernel void test_qsad_pk_u16_u8(global ulong* out, ulong src0, uint src1, ulong src2) {
|
|
*out = __builtin_amdgcn_qsad_pk_u16_u8(src0, src1, src2);
|
|
}
|