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
203 lines
7.4 KiB
HLSL
203 lines
7.4 KiB
HLSL
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
|
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type -fnative-int16-type \
|
|
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
|
|
// RUN: --check-prefixes=CHECK,NATIVE_HALF
|
|
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
|
|
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
|
|
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
|
|
|
|
// CHECK-LABEL: test_atan2_half1x2
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.atan2.v2f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.atan2.v2f32
|
|
half1x2 test_atan2_half1x2 (half1x2 p0, half1x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half1x3
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.atan2.v3f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.atan2.v3f32
|
|
half1x3 test_atan2_half1x3 (half1x3 p0, half1x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half1x4
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.atan2.v4f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
half1x4 test_atan2_half1x4 (half1x4 p0, half1x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half2x1
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.atan2.v2f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.atan2.v2f32
|
|
half2x1 test_atan2_half2x1 (half2x1 p0, half2x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half2x2
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.atan2.v4f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
half2x2 test_atan2_half2x2 (half2x2 p0, half2x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half2x3
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <6 x half> @llvm.atan2.v6f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.atan2.v6f32
|
|
half2x3 test_atan2_half2x3 (half2x3 p0, half2x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half2x4
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <8 x half> @llvm.atan2.v8f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.atan2.v8f32
|
|
half2x4 test_atan2_half2x4 (half2x4 p0, half2x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half3x1
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.atan2.v3f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.atan2.v3f32
|
|
half3x1 test_atan2_half3x1 (half3x1 p0, half3x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half3x2
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <6 x half> @llvm.atan2.v6f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.atan2.v6f32
|
|
half3x2 test_atan2_half3x2 (half3x2 p0, half3x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half3x3
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <9 x half> @llvm.atan2.v9f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <9 x float> @llvm.atan2.v9f32
|
|
half3x3 test_atan2_half3x3 (half3x3 p0, half3x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half3x4
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <12 x half> @llvm.atan2.v12f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.atan2.v12f32
|
|
half3x4 test_atan2_half3x4 (half3x4 p0, half3x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half4x1
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.atan2.v4f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
half4x1 test_atan2_half4x1 (half4x1 p0, half4x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half4x2
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <8 x half> @llvm.atan2.v8f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.atan2.v8f32
|
|
half4x2 test_atan2_half4x2 (half4x2 p0, half4x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half4x3
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <12 x half> @llvm.atan2.v12f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.atan2.v12f32
|
|
half4x3 test_atan2_half4x3 (half4x3 p0, half4x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_half4x4
|
|
// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <16 x half> @llvm.atan2.v16f16
|
|
// NO_HALF: call reassoc nnan ninf nsz arcp afn <16 x float> @llvm.atan2.v16f32
|
|
half4x4 test_atan2_half4x4 (half4x4 p0, half4x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float1x2
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.atan2.v2f32
|
|
float1x2 test_atan2_float1x2 (float1x2 p0, float1x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float1x3
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.atan2.v3f32
|
|
float1x3 test_atan2_float1x3 (float1x3 p0, float1x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float1x4
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
float1x4 test_atan2_float1x4 (float1x4 p0, float1x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float2x1
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.atan2.v2f32
|
|
float2x1 test_atan2_float2x1 (float2x1 p0, float2x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float2x2
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
float2x2 test_atan2_float2x2 (float2x2 p0, float2x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float2x3
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.atan2.v6f32
|
|
float2x3 test_atan2_float2x3 (float2x3 p0, float2x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float2x4
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.atan2.v8f32
|
|
float2x4 test_atan2_float2x4 (float2x4 p0, float2x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float3x1
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.atan2.v3f32
|
|
float3x1 test_atan2_float3x1 (float3x1 p0, float3x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float3x2
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <6 x float> @llvm.atan2.v6f32
|
|
float3x2 test_atan2_float3x2 (float3x2 p0, float3x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float3x3
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <9 x float> @llvm.atan2.v9f32
|
|
float3x3 test_atan2_float3x3 (float3x3 p0, float3x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float3x4
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.atan2.v12f32
|
|
float3x4 test_atan2_float3x4 (float3x4 p0, float3x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float4x1
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.atan2.v4f32
|
|
float4x1 test_atan2_float4x1 (float4x1 p0, float4x1 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float4x2
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <8 x float> @llvm.atan2.v8f32
|
|
float4x2 test_atan2_float4x2 (float4x2 p0, float4x2 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float4x3
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <12 x float> @llvm.atan2.v12f32
|
|
float4x3 test_atan2_float4x3 (float4x3 p0, float4x3 p1) {
|
|
return atan2(p0, p1);
|
|
}
|
|
|
|
// CHECK-LABEL: test_atan2_float4x4
|
|
// CHECK: call reassoc nnan ninf nsz arcp afn <16 x float> @llvm.atan2.v16f32
|
|
float4x4 test_atan2_float4x4 (float4x4 p0, float4x4 p1) {
|
|
return atan2(p0, p1);
|
|
}
|