================
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -finclude-default-header \
+// RUN: -fnative-half-type -fnative-int16-type \
+// RUN: -triple dxil-pc-shadermodel6.5-library -verify %s
+// RUN: %clang_cc1 -finclude-default-header \
+// RUN: -fnative-half-type -fnative-int16-type \
+// RUN: -triple spirv-pc-vulkan-library -verify %s
+// RUN: %clang_cc1 -finclude-default-header -DTEST_AVAILABILITY \
+// RUN: -triple dxil-pc-shadermodel6.4-library -verify=availability %s
+
+#ifdef TEST_AVAILABILITY
+[shader("compute")]
+[numthreads(1, 1, 1)]
+void main() {
+ (void)WaveMultiPrefixSum(1.0f, uint4(1, 2, 4, 8));
+ // availability-error@-1 {{only available on Shader Model 6.5 or newer}}
+ // availability-note@*:* {{introduced in Shader Model 6.5}}
+}
+#else
+void test_arg_count(float value, uint4 mask) {
+ __builtin_hlsl_wave_multi_prefix_sum(value);
+ // expected-error@-1 {{too few arguments to function call, expected 2}}
+ __builtin_hlsl_wave_multi_prefix_sum(value, mask, mask);
+ // expected-error@-1 {{too many arguments to function call, expected 2}}
+}
+
+struct S { float value; };
+
+void test_value_types(bool b, bool2 bv, bool2x2 bm, S s, uint4 mask) {
+ __builtin_hlsl_wave_multi_prefix_sum(b, mask);
+ // expected-error@-1 {{invalid operand of type 'bool'}}
+ __builtin_hlsl_wave_multi_prefix_sum(bv, mask);
+ // expected-error@-1 {{invalid operand of type 'bool2'}}
+ __builtin_hlsl_wave_multi_prefix_sum(bm, mask);
+ // expected-error@-1 {{matrix, integer or floating-point}}
----------------
spall wrote:
this error message is really odd. is this the actual error message, can we
improve it?
https://github.com/llvm/llvm-project/pull/238175
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits