@@ -76,37 +76,37 @@ int64_t test_builtin_dot_vec_int16_to_int64_promotion(int64_t2 p0,
76
76
77
77
float test_builtin_dot_float2_splat (float p0, float2 p1) {
78
78
return __builtin_hlsl_dot (p0, p1);
79
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
79
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
80
80
}
81
81
82
82
float test_builtin_dot_float3_splat (float p0, float3 p1) {
83
83
return __builtin_hlsl_dot (p0, p1);
84
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
84
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
85
85
}
86
86
87
87
float test_builtin_dot_float4_splat (float p0, float4 p1) {
88
88
return __builtin_hlsl_dot (p0, p1);
89
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
89
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
90
90
}
91
91
92
92
float test_dot_float2_int_splat (float2 p0, int p1) {
93
93
return __builtin_hlsl_dot (p0, p1);
94
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
94
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
95
95
}
96
96
97
97
float test_dot_float3_int_splat (float3 p0, int p1) {
98
98
return __builtin_hlsl_dot (p0, p1);
99
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
99
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
100
100
}
101
101
102
102
float test_builtin_dot_int_vect_to_float_vec_promotion (int2 p0, float p1) {
103
103
return __builtin_hlsl_dot (p0, p1);
104
- // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must be vectors }}
104
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type }}
105
105
}
106
106
107
107
int test_builtin_dot_bool_type_promotion (bool p0, float p1) {
108
108
return __builtin_hlsl_dot (p0, p1);
109
- // expected-error@-1 {{1st argument must be a vector, integer or floating-point type (was 'bool')}}
109
+ // expected-error@-1 {{1st argument must be a scalar or vector of integer or floating-point types (was 'bool')}}
110
110
}
111
111
112
112
double test_dot_double (double2 p0, double2 p1) {
@@ -120,10 +120,15 @@ double test_dot_double_builtin(double2 p0, double2 p1) {
120
120
121
121
float builtin_bool_to_float_type_promotion ( float p0, bool p1 ) {
122
122
return __builtin_hlsl_dot ( p0, p1 );
123
- // expected-error@-1 {{are of different types ('float' vs 'bool')}}
123
+ // expected-error@-1 {{2nd argument must be a scalar or vector of integer or floating-point types (was 'bool')}}
124
124
}
125
125
126
126
float builtin_dot_int_to_float_promotion ( float p0, int p1 ) {
127
127
return __builtin_hlsl_dot (p0, p1 );
128
- // expected-error@-1 {{are of different types ('float' vs 'int')}}
128
+ // expected-error@-1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
129
+ }
130
+
131
+ // should not error
132
+ uint builtin_dot_literal_shouldnt_error ( uint4 p0) {
133
+ return dot (p0, 1u.xxxx);
129
134
}
0 commit comments