[clang] [CIR] Implement support for MatrixSingleSubstract expr (PR #232079)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 13:46:17 PDT 2026
================
@@ -4521,6 +4521,26 @@ OpFoldResult cir::VecTernaryOp::fold(FoldAdaptor adaptor) {
vecTy, mlir::ArrayAttr::get(getContext(), elements));
}
+//===----------------------------------------------------------------------===//
+// MatrixExtractOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult MatrixExtractOp::inferReturnTypes(
+ MLIRContext *context, std::optional<Location> location, ValueRange operands,
+ DictionaryAttr attributes, PropertyRef properties, RegionRange regions,
+ SmallVectorImpl<Type> &inferredReturnTypes) {
+ auto matrixType = dyn_cast<cir::MatrixType>(operands[0].getType());
+ if (operands.size() == 3) {
----------------
erichkeane wrote:
Rather than this, I'd rather we check if 'Rows' is provided? It would be more clear to me/be future proof for when/if we add an extra thing.
https://github.com/llvm/llvm-project/pull/232079
More information about the cfe-commits
mailing list