[Matrix] Implement * binary operator for MatrixType.
authorFlorian Hahn <flo@fhahn.com>
Sun, 7 Jun 2020 10:11:27 +0000 (11:11 +0100)
committerFlorian Hahn <flo@fhahn.com>
Sun, 7 Jun 2020 10:11:27 +0000 (11:11 +0100)
commit4affc444b499ba2a12fee7f9ef0bb6ef33789c12
tree4468fc0a195edba675c617a0475dd16e58315099
parent1beffc18886ae4cd72dfe1f9b6b79204cac51e5e
[Matrix] Implement * binary operator for MatrixType.

This patch implements the * binary operator for values of
MatrixType. It adds support for matrix * matrix, scalar * matrix and
matrix * scalar.

For the matrix, matrix case, the number of columns of the first operand
must match the number of rows of the second. For the scalar,matrix variants,
the element type of the matrix must match the scalar type.

Reviewers: rjmccall, anemet, Bigcheese, rsmith, martong

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D76794
clang/include/clang/Sema/Sema.h
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaOverload.cpp
clang/test/CodeGen/matrix-type-operators.c
clang/test/CodeGenCXX/matrix-type-operators.cpp
clang/test/Sema/matrix-type-operators.c
clang/test/SemaCXX/matrix-type-operators.cpp
llvm/include/llvm/IR/MatrixBuilder.h