brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.2 KiB · c583013 Raw
61 lines · plain
1// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \2// RUN:  -fnative-half-type -fnative-int16-type -emit-llvm -disable-llvm-passes -o - | \3// RUN:  FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -Dtar=dx4// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \5// RUN:  -emit-llvm -disable-llvm-passes -o - | \6// RUN:  FileCheck %s --check-prefixes=CHECK,NO_HALF -Dtar=dx7 8// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-library %s \9// RUN:  -fnative-half-type -fnative-int16-type -emit-llvm -disable-llvm-passes -o - | \10// RUN:  FileCheck %s --check-prefixes=CHECK,NATIVE_HALF -Dtar=spv11// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-library %s \12// RUN:  -emit-llvm -disable-llvm-passes -o - | \13// RUN:  FileCheck %s --check-prefixes=CHECK,NO_HALF -Dtar=spv14 15// NATIVE_HALF-LABEL: define{{.*}} half @_Z18test_saturate_halfDh16// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.[[tar]].saturate.f16(17// NO_HALF-LABEL: define{{.*}} float @_Z18test_saturate_halfDh18// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.[[tar]].saturate.f32(19half test_saturate_half(half p0) { return saturate(p0); }20// NATIVE_HALF-LABEL: define{{.*}} <2 x half> @_Z19test_saturate_half2Dv2_Dh21// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.[[tar]].saturate.v2f1622// NO_HALF-LABEL: define{{.*}} <2 x float> @_Z19test_saturate_half2Dv2_Dh23// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.[[tar]].saturate.v2f32(24half2 test_saturate_half2(half2 p0) { return saturate(p0); }25// NATIVE_HALF-LABEL: define{{.*}} <3 x half> @_Z19test_saturate_half3Dv3_Dh(26// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.[[tar]].saturate.v3f1627// NO_HALF-LABEL: define{{.*}} <3 x float> @_Z19test_saturate_half3Dv3_Dh(<3 x float>28// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.[[tar]].saturate.v3f32(29half3 test_saturate_half3(half3 p0) { return saturate(p0); }30// NATIVE_HALF-LABEL: define{{.*}} <4 x half> @_Z19test_saturate_half4Dv4_Dh(31// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.[[tar]].saturate.v4f1632// NO_HALF-LABEL: define{{.*}} <4 x float> @_Z19test_saturate_half4Dv4_Dh(<4 x float>33// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.[[tar]].saturate.v4f32(34half4 test_saturate_half4(half4 p0) { return saturate(p0); }35 36// CHECK-LABEL: define{{.*}} float @_Z19test_saturate_floatf(37// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.[[tar]].saturate.f32(38float test_saturate_float(float p0) { return saturate(p0); }39// CHECK-LABEL: define{{.*}} <2 x float> @_Z20test_saturate_float2Dv2_f(<2 x float>40// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.[[tar]].saturate.v2f3241float2 test_saturate_float2(float2 p0) { return saturate(p0); }42// CHECK-LABEL: define{{.*}} <3 x float> @_Z20test_saturate_float3Dv3_f(<3 x float>43// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.[[tar]].saturate.v3f3244float3 test_saturate_float3(float3 p0) { return saturate(p0); }45// CHECK-LABEL: define{{.*}} <4 x float> @_Z20test_saturate_float4Dv4_f(<4 x float>46// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.[[tar]].saturate.v4f3247float4 test_saturate_float4(float4 p0) { return saturate(p0); }48 49// CHECK-LABEL: define{{.*}} double @_Z20test_saturate_doubled(double50// CHECK: call reassoc nnan ninf nsz arcp afn double @llvm.[[tar]].saturate.f64(51double test_saturate_double(double p0) { return saturate(p0); }52// CHECK-LABEL: define{{.*}} <2 x double> @_Z21test_saturate_double2Dv2_d(<2 x double>53// CHECK: call reassoc nnan ninf nsz arcp afn <2 x double> @llvm.[[tar]].saturate.v2f6454double2 test_saturate_double2(double2 p0) { return saturate(p0); }55// CHECK-LABEL: define{{.*}} <3 x double> @_Z21test_saturate_double3Dv3_d(<3 x double>56// CHECK: call reassoc nnan ninf nsz arcp afn <3 x double> @llvm.[[tar]].saturate.v3f6457double3 test_saturate_double3(double3 p0) { return saturate(p0); }58// CHECK-LABEL: define{{.*}} <4 x double> @_Z21test_saturate_double4Dv4_d(<4 x double>59// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.[[tar]].saturate.v4f6460double4 test_saturate_double4(double4 p0) { return saturate(p0); }61