Debian Codegraph @

clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl

raw
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=CHECK
4
5 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_double
6 // CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
7 float test_sin_double(double p0) { return sin(p0); }
8 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_double2
9 // CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
10 float2 test_sin_double2(double2 p0) { return sin(p0); }
11 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_double3
12 // CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
13 float3 test_sin_double3(double3 p0) { return sin(p0); }
14 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_double4
15 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
16 float4 test_sin_double4(double4 p0) { return sin(p0); }
17
18 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_int
19 // CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
20 float test_sin_int(int p0) { return sin(p0); }
21 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int2
22 // CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
23 float2 test_sin_int2(int2 p0) { return sin(p0); }
24 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int3
25 // CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
26 float3 test_sin_int3(int3 p0) { return sin(p0); }
27 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int4
28 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
29 float4 test_sin_int4(int4 p0) { return sin(p0); }
30
31 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_uint
32 // CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
33 float test_sin_uint(uint p0) { return sin(p0); }
34 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint2
35 // CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
36 float2 test_sin_uint2(uint2 p0) { return sin(p0); }
37 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint3
38 // CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
39 float3 test_sin_uint3(uint3 p0) { return sin(p0); }
40 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint4
41 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
42 float4 test_sin_uint4(uint4 p0) { return sin(p0); }
43
44 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_int64_t
45 // CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
46 float test_sin_int64_t(int64_t p0) { return sin(p0); }
47 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_int64_t2
48 // CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
49 float2 test_sin_int64_t2(int64_t2 p0) { return sin(p0); }
50 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_int64_t3
51 // CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
52 float3 test_sin_int64_t3(int64_t3 p0) { return sin(p0); }
53 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_int64_t4
54 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
55 float4 test_sin_int64_t4(int64_t4 p0) { return sin(p0); }
56
57 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_sin_uint64_t
58 // CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.sin.f32(
59 float test_sin_uint64_t(uint64_t p0) { return sin(p0); }
60 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_sin_uint64_t2
61 // CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sin.v2f32
62 float2 test_sin_uint64_t2(uint64_t2 p0) { return sin(p0); }
63 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_sin_uint64_t3
64 // CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sin.v3f32
65 float3 test_sin_uint64_t3(uint64_t3 p0) { return sin(p0); }
66 // CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_sin_uint64_t4
67 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.sin.v4f32
68 float4 test_sin_uint64_t4(uint64_t4 p0) { return sin(p0); }