[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 16:13:54 PST 2024


================
@@ -0,0 +1,110 @@
+// 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
+
+float test_no_second_arg ( float2 p0) {
+  return __builtin_hlsl_dot ( p0 );
+  // expected-error at -1 {{too few arguments to function call, expected 2, have 1}}
+}
+
+float test_too_many_arg ( float2 p0) {
+  return __builtin_hlsl_dot ( p0, p0, p0 );
+  // expected-error at -1 {{too many arguments to function call, expected 2, have 3}}
+}
+
+//NOTE: eventually behavior should match builtin
----------------
llvm-beanz wrote:

I’m not sure this comment is accurate.

https://github.com/llvm/llvm-project/pull/81190


More information about the cfe-commits mailing list