41 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 8// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_log_half9// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.log.f16(10// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_log_half11// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(12half test_log_half(half p0) { return log(p0); }13// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_log_half214// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.log.v2f1615// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_log_half216// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f32(17half2 test_log_half2(half2 p0) { return log(p0); }18// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_log_half319// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.log.v3f1620// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_log_half321// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f32(22half3 test_log_half3(half3 p0) { return log(p0); }23// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_log_half424// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.log.v4f1625// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_log_half426// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f32(27half4 test_log_half4(half4 p0) { return log(p0); }28 29// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_log_float30// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log.f32(31float test_log_float(float p0) { return log(p0); }32// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_log_float233// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log.v2f3234float2 test_log_float2(float2 p0) { return log(p0); }35// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_log_float336// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log.v3f3237float3 test_log_float3(float3 p0) { return log(p0); }38// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_log_float439// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log.v4f3240float4 test_log_float4(float4 p0) { return log(p0); }41