[Lldb-commits] [clang] [lldb] [llvm] [OpenCL][Clang] Add support for cooperative matrix extension (PR #221328)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 24 17:56:26 PDT 2026
================
@@ -14097,6 +14097,37 @@ void Sema::DiagnoseUniqueObjectDuplication(const VarDecl *VD) {
}
}
+// Return true if RHSExpr is a cooperative matrix builtin call.
+bool Sema::IsCoopMatrixBuiltin(Expr *RHSExpr) {
+ auto call = dyn_cast<CallExpr>(RHSExpr);
+ if (!call)
+ return false;
+ FunctionDecl *F = call->getDirectCallee();
+ if (!F)
+ return false;
+ DeclarationName MemberName = F->getDeclName();
+ IdentifierInfo *Fname = MemberName.getAsIdentifierInfo();
+ if (!Fname)
+ return false;
+ switch (F->getBuiltinID()) {
+ case Builtin::BIcoop_mat_load:
+ case Builtin::BIcoop_mat_store:
+ case Builtin::BIcoop_mat_mulAdd:
+ case Builtin::BIcoop_mat_binary_add:
+ case Builtin::BIcoop_mat_binary_sub:
+ case Builtin::BIcoop_mat_binary_mul:
+ case Builtin::BIcoop_mat_binary_div:
+ case Builtin::BIcoop_mat_scalar_mul:
+ case Builtin::BIcoop_mat_scalar_neg:
+ case Builtin::BIcoop_mat_init:
+ return true;
+ default:
+ return false;
+ }
+
+ return false;
----------------
asudarsa-qti wrote:
Fixed as part of a1cd6feadde77a6cc87a39f1dd73f66c1f3a355e
https://github.com/llvm/llvm-project/pull/221328
More information about the lldb-commits
mailing list