84 lines · plain
1// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \2// RUN: -emit-llvm -disable-llvm-passes -o - | \3// RUN: FileCheck %s --check-prefixes=CHECK4 5// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_double6// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(7float test_trunc_double(double p0) { return trunc(p0); }8 9// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_double210// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3211float2 test_trunc_double2(double2 p0) { return trunc(p0); }12 13// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_double314// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3215float3 test_trunc_double3(double3 p0) { return trunc(p0); }16 17// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_double418// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3219float4 test_trunc_double4(double4 p0) { return trunc(p0); }20 21// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_int22// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(23float test_trunc_int(int p0) { return trunc(p0); }24 25// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int226// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3227float2 test_trunc_int2(int2 p0) { return trunc(p0); }28 29// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int330// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3231float3 test_trunc_int3(int3 p0) { return trunc(p0); }32 33// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int434// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3235float4 test_trunc_int4(int4 p0) { return trunc(p0); }36 37// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_uint38// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(39float test_trunc_uint(uint p0) { return trunc(p0); }40 41// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint242// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3243float2 test_trunc_uint2(uint2 p0) { return trunc(p0); }44 45// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint346// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3247float3 test_trunc_uint3(uint3 p0) { return trunc(p0); }48 49// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint450// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3251float4 test_trunc_uint4(uint4 p0) { return trunc(p0); }52 53// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_int64_t54// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(55float test_trunc_int64_t(int64_t p0) { return trunc(p0); }56 57// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_int64_t258// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3259float2 test_trunc_int64_t2(int64_t2 p0) { return trunc(p0); }60 61// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_int64_t362// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3263float3 test_trunc_int64_t3(int64_t3 p0) { return trunc(p0); }64 65// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_int64_t466// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3267float4 test_trunc_int64_t4(int64_t4 p0) { return trunc(p0); }68 69// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_trunc_uint64_t70// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.trunc.f32(71float test_trunc_uint64_t(uint64_t p0) { return trunc(p0); }72 73// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_trunc_uint64_t274// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.trunc.v2f3275float2 test_trunc_uint64_t2(uint64_t2 p0) { return trunc(p0); }76 77// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_trunc_uint64_t378// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.trunc.v3f3279float3 test_trunc_uint64_t3(uint64_t3 p0) { return trunc(p0); }80 81// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_trunc_uint64_t482// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.trunc.v4f3283float4 test_trunc_uint64_t4(uint64_t4 p0) { return trunc(p0); }84