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 @_Z15test_log10_half9// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.log10.f16(10// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_log10_half11// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(12half test_log10_half(half p0) { return log10(p0); }13// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_log10_half214// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.log10.v2f1615// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_log10_half216// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f32(17half2 test_log10_half2(half2 p0) { return log10(p0); }18// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_log10_half319// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.log10.v3f1620// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_log10_half321// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f32(22half3 test_log10_half3(half3 p0) { return log10(p0); }23// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_log10_half424// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.log10.v4f1625// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_log10_half426// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f32(27half4 test_log10_half4(half4 p0) { return log10(p0); }28 29// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_log10_float30// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.log10.f32(31float test_log10_float(float p0) { return log10(p0); }32// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_log10_float233// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.log10.v2f3234float2 test_log10_float2(float2 p0) { return log10(p0); }35// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_log10_float336// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.log10.v3f3237float3 test_log10_float3(float3 p0) { return log10(p0); }38// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_log10_float439// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.log10.v4f3240float4 test_log10_float4(float4 p0) { return log10(p0); }41