[clang] [llvm] [Matrix] Implement matrix support for the `pow` intrinsic (PR #212514)

Kaitlin Peng via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 08:26:41 PDT 2026


================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify
+
+
+double2x2 test_vec_double_builtin(double2x2 p0, double2x2 p1) {
+    return __builtin_elementwise_pow(p0, p1);
+  // expected-error at -1 {{1st argument must be a scalar or vector of 16 or 32 bit floating-point types (was 'double2x2' (aka 'matrix<double, 2, 2>'))}}
----------------
kmpeng wrote:

I'm aware this error message isn't accurate, but changing it affects a lot of intrinsics. That would have to be a separate PR.

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


More information about the cfe-commits mailing list