brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 58cc78e Raw
47 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_trunc_half9// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn half @llvm.trunc.f16(10// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z15test_trunc_half11// NO_HALF: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(12half test_trunc_half(half p0) { return trunc(p0); }13 14// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z16test_trunc_half215// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.trunc.v2f1616// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z16test_trunc_half217// NO_HALF: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f32(18half2 test_trunc_half2(half2 p0) { return trunc(p0); }19 20// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z16test_trunc_half321// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.trunc.v3f1622// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z16test_trunc_half323// NO_HALF: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f32(24half3 test_trunc_half3(half3 p0) { return trunc(p0); }25 26// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z16test_trunc_half427// NATIVE_HALF: call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.trunc.v4f1628// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z16test_trunc_half429// NO_HALF: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f32(30half4 test_trunc_half4(half4 p0) { return trunc(p0); }31 32// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z16test_trunc_float33// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(34float test_trunc_float(float p0) { return trunc(p0); }35 36// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z17test_trunc_float237// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3238float2 test_trunc_float2(float2 p0) { return trunc(p0); }39 40// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z17test_trunc_float341// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3242float3 test_trunc_float3(float3 p0) { return trunc(p0); }43 44// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z17test_trunc_float445// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3246float4 test_trunc_float4(float4 p0) { return trunc(p0); }47