71 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 5using hlsl::floor;6 7// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_double8// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(9float test_floor_double(double p0) { return floor(p0); }10// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_double211// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(12float2 test_floor_double2(double2 p0) { return floor(p0); }13// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_double314// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(15float3 test_floor_double3(double3 p0) { return floor(p0); }16// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_double417// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(18float4 test_floor_double4(double4 p0) { return floor(p0); }19 20// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_int21// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(22float test_floor_int(int p0) { return floor(p0); }23// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int224// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(25float2 test_floor_int2(int2 p0) { return floor(p0); }26// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int327// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(28float3 test_floor_int3(int3 p0) { return floor(p0); }29// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int430// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(31float4 test_floor_int4(int4 p0) { return floor(p0); }32 33// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_uint34// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(35float test_floor_uint(uint p0) { return floor(p0); }36// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint237// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(38float2 test_floor_uint2(uint2 p0) { return floor(p0); }39// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint340// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(41float3 test_floor_uint3(uint3 p0) { return floor(p0); }42// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint443// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(44float4 test_floor_uint4(uint4 p0) { return floor(p0); }45 46// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_int64_t47// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(48float test_floor_int64_t(int64_t p0) { return floor(p0); }49// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_int64_t250// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(51float2 test_floor_int64_t2(int64_t2 p0) { return floor(p0); }52// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_int64_t353// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(54float3 test_floor_int64_t3(int64_t3 p0) { return floor(p0); }55// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_int64_t456// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(57float4 test_floor_int64_t4(int64_t4 p0) { return floor(p0); }58 59// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_floor_uint64_t60// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.floor.f32(61float test_floor_uint64_t(uint64_t p0) { return floor(p0); }62// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_floor_uint64_t263// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.floor.v2f32(64float2 test_floor_uint64_t2(uint64_t2 p0) { return floor(p0); }65// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_floor_uint64_t366// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.floor.v3f32(67float3 test_floor_uint64_t3(uint64_t3 p0) { return floor(p0); }68// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_floor_uint64_t469// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.floor.v4f32(70float4 test_floor_uint64_t4(uint64_t4 p0) { return floor(p0); }71