brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · d87d56e Raw
43 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_HALF4// 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_HALF7 8using hlsl::ceil;9 10// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z14test_ceil_half11// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.ceil.f16(12// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_ceil_half13// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(float %0)14half test_ceil_half(half p0) { return ceil(p0); }15// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z15test_ceil_half216// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.ceil.v2f16(17// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_ceil_half218// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(19half2 test_ceil_half2(half2 p0) { return ceil(p0); }20// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z15test_ceil_half321// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.ceil.v3f16(22// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_ceil_half323// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(24half3 test_ceil_half3(half3 p0) { return ceil(p0); }25// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z15test_ceil_half426// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.ceil.v4f16(27// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_ceil_half428// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(29half4 test_ceil_half4(half4 p0) { return ceil(p0); }30 31// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_ceil_float32// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.ceil.f32(33float test_ceil_float(float p0) { return ceil(p0); }34// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_ceil_float235// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.ceil.v2f32(36float2 test_ceil_float2(float2 p0) { return ceil(p0); }37// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_ceil_float338// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.ceil.v3f32(39float3 test_ceil_float3(float3 p0) { return ceil(p0); }40// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_ceil_float441// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.ceil.v4f32(42float4 test_ceil_float4(float4 p0) { return ceil(p0); }43