Skip to content

Commit cb9768b

Browse files
committed
run clang format on tests
1 parent 2ec582b commit cb9768b

File tree

2 files changed

+18
-34
lines changed

2 files changed

+18
-34
lines changed

clang/test/CodeGenHLSL/builtins/frac.hlsl

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,42 @@
1212
// NO_HALF: define noundef float @"?test_frac_half@@YA$halff@$halff@@Z"(
1313
// NO_HALF: %dx.frac = call float @llvm.dx.frac.f32(
1414
// NO_HALF: ret float %dx.frac
15-
half test_frac_half ( half p0 ) {
16-
return frac ( p0 );
17-
}
15+
half test_frac_half(half p0) { return frac(p0); }
1816
// NATIVE_HALF: define noundef <2 x half> @
1917
// NATIVE_HALF: %dx.frac = call <2 x half> @llvm.dx.frac.v2f16
2018
// NATIVE_HALF: ret <2 x half> %dx.frac
2119
// NO_HALF: define noundef <2 x float> @
2220
// NO_HALF: %dx.frac = call <2 x float> @llvm.dx.frac.v2f32(
2321
// NO_HALF: ret <2 x float> %dx.frac
24-
half2 test_frac_half2 ( half2 p0 ) {
25-
return frac ( p0 );
26-
}
22+
half2 test_frac_half2(half2 p0) { return frac(p0); }
2723
// NATIVE_HALF: define noundef <3 x half> @
2824
// NATIVE_HALF: %dx.frac = call <3 x half> @llvm.dx.frac.v3f16
2925
// NATIVE_HALF: ret <3 x half> %dx.frac
3026
// NO_HALF: define noundef <3 x float> @
3127
// NO_HALF: %dx.frac = call <3 x float> @llvm.dx.frac.v3f32(
3228
// NO_HALF: ret <3 x float> %dx.frac
33-
half3 test_frac_half3 ( half3 p0 ) {
34-
return frac ( p0 );
35-
}
29+
half3 test_frac_half3(half3 p0) { return frac(p0); }
3630
// NATIVE_HALF: define noundef <4 x half> @
3731
// NATIVE_HALF: %dx.frac = call <4 x half> @llvm.dx.frac.v4f16
3832
// NATIVE_HALF: ret <4 x half> %dx.frac
3933
// NO_HALF: define noundef <4 x float> @
4034
// NO_HALF: %dx.frac = call <4 x float> @llvm.dx.frac.v4f32(
4135
// NO_HALF: ret <4 x float> %dx.frac
42-
half4 test_frac_half4 ( half4 p0 ) {
43-
return frac ( p0 );
44-
}
36+
half4 test_frac_half4(half4 p0) { return frac(p0); }
4537

4638
// CHECK: define noundef float @
4739
// CHECK: %dx.frac = call float @llvm.dx.frac.f32(
4840
// CHECK: ret float %dx.frac
49-
float test_frac_float ( float p0 ) {
50-
return frac ( p0 );
51-
}
41+
float test_frac_float(float p0) { return frac(p0); }
5242
// CHECK: define noundef <2 x float> @
5343
// CHECK: %dx.frac = call <2 x float> @llvm.dx.frac.v2f32
5444
// CHECK: ret <2 x float> %dx.frac
55-
float2 test_frac_float2 ( float2 p0 ) {
56-
return frac ( p0 );
57-
}
45+
float2 test_frac_float2(float2 p0) { return frac(p0); }
5846
// CHECK: define noundef <3 x float> @
5947
// CHECK: %dx.frac = call <3 x float> @llvm.dx.frac.v3f32
6048
// CHECK: ret <3 x float> %dx.frac
61-
float3 test_frac_float3 ( float3 p0 ) {
62-
return frac ( p0 );
63-
}
49+
float3 test_frac_float3(float3 p0) { return frac(p0); }
6450
// CHECK: define noundef <4 x float> @
6551
// CHECK: %dx.frac = call <4 x float> @llvm.dx.frac.v4f32
6652
// CHECK: ret <4 x float> %dx.frac
67-
float4 test_frac_float4 ( float4 p0 ) {
68-
return frac ( p0 );
69-
}
53+
float4 test_frac_float4(float4 p0) { return frac(p0); }
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11

22
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected
33

4-
float test_too_few_arg () {
5-
return __builtin_hlsl_elementwise_frac ();
4+
float test_too_few_arg() {
5+
return __builtin_hlsl_elementwise_frac();
66
// expected-error@-1 {{too few arguments to function call, expected 1, have 0}}
77
}
88

9-
float2 test_too_many_arg ( float2 p0) {
10-
return __builtin_hlsl_elementwise_frac ( p0, p0);
9+
float2 test_too_many_arg(float2 p0) {
10+
return __builtin_hlsl_elementwise_frac(p0, p0);
1111
// expected-error@-1 {{too many arguments to function call, expected 1, have 2}}
1212
}
1313

14-
float builtin_bool_to_float_type_promotion ( bool p1 ) {
15-
return __builtin_hlsl_elementwise_frac ( p1 );
14+
float builtin_bool_to_float_type_promotion(bool p1) {
15+
return __builtin_hlsl_elementwise_frac(p1);
1616
// expected-error@-1 {{1st argument must be a vector, integer or floating point type (was 'bool')}}
1717
}
1818

19-
float builtin_frac_int_to_float_promotion (int p1 ) {
20-
return __builtin_hlsl_elementwise_frac ( p1 );
19+
float builtin_frac_int_to_float_promotion(int p1) {
20+
return __builtin_hlsl_elementwise_frac(p1);
2121
// expected-error@-1 {{passing 'int' to parameter of incompatible type 'float'}}
2222
}
2323

24-
float2 builtin_frac_int2_to_float2_promotion (int2 p1 ) {
25-
return __builtin_hlsl_elementwise_frac ( p1 );
24+
float2 builtin_frac_int2_to_float2_promotion(int2 p1) {
25+
return __builtin_hlsl_elementwise_frac(p1);
2626
// expected-error@-1 {{passing 'int2' (aka 'vector<int, 2>') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(float)))) float' (vector of 2 'float' values)}}
2727
}

0 commit comments

Comments
 (0)