================
@@ -6576,202 +6284,24 @@ def CIR_VecSplatOp : CIR_Op<"vec.splat", [
     ```
     %value = cir.const #cir.int<3> : !s32i
     %value_vec = cir.vec.splat %value : !s32i, !cir.vector<4 x !s32i>
-    %value_mat = cir.vec.splat %value : !s32i, !cir.matrix<2 x 2 x !s32i>
     ```
   }];
 
   let arguments = (ins CIR_VectorElementType:$value);
-  let results = (outs AnyTypeOf<[CIR_VectorType, CIR_MatrixType],
-                                "vector or matrix type">:$result);
+  let results = (outs CIR_VectorType:$result);
 
   let assemblyFormat = [{
     $value `:` type($value) `,` qualified(type($result)) attr-dict
   }];
 }
 
 
//===----------------------------------------------------------------------===//
-// MatrixExtractOp
-//===----------------------------------------------------------------------===//
-
-def CIR_MatrixExtractOp : CIR_Op<"matrix.extract", [
-  Pure,
-  TypesMatchWith<"type of 'result' matches element type of 'matrix'",
-    "matrix", "result", "mlir::cast<cir::MatrixType>($_self).getElementType()">
-]> {
-  let summary = "Extract one element from a matrix object";
-  let description = [{
-    The `cir.matrix.extract` operation extracts the element at the given row 
-    and column indices from a matrix object.
-
-    Currently, the flatten index is a column-based index.
-
-    ```
-    %rowIdx = cir.const #cir.int<1> : !u64i
-    %columnIdx = cir.const #cir.int<2> : !u64i
-    %element = cir.matrix.extract %matrix[%rowIdx : !u64i] [%columnIdx : 
!u64i] 
-      : !cir.matrix<3 x 3 x !cir.float>
-    ```
-  }];
-
-  let arguments = (ins 
-    CIR_MatrixType:$matrix,
-    CIR_AnyFundamentalIntType:$rowIdx,
-    CIR_AnyFundamentalIntType:$columnIdx
-  );
-
-  let results = (outs CIR_MatrixElementType:$result);
-
-  let assemblyFormat = [{
-    $matrix
-    `[` $rowIdx `:` type($rowIdx) `]` `[` $columnIdx `:` type($columnIdx) `]`
-    attr-dict `:` qualified(type($matrix))
-  }];
-}
-
-//===----------------------------------------------------------------------===//
-// MatrixColumnMajorLoadOp
-//===----------------------------------------------------------------------===//
-
-def CIR_MatrixColumnMajorLoadOp : CIR_Op<"matrix.column_major_load", [
-  DeclareOpInterfaceMethods<PromotableMemOpInterface>,
-]> {
-  let summary = "Matrix column major load";
-  let description = [{
-    The `cir.matrix.column_major_load` operation provides a representation for
-    the `__builtin_matrix_column_major_load` builtin and corresponds to the
-    `llvm.matrix.column.major.load` intrinsic in LLVM IR.
-
-    This operation performs a load of any matrix type with a stride to compute
-    the start address of the different columns.
-
-    The `stride` argument is the column stride which much be greater than or 
equal 
-    to `row`, giving the following 2x3 matrix `[[1, 2, 3], [4, 5, 6]]` with a 
-    stride of 2, the result matrix will be `[[1, 3, 5], [2, 4, 6]]`.
-
-    ```
-    %result = cir.matrix.column_major_load %ptr : <!cir.float>, %stride : 
!u64i, 
-      !cir.matrix<2 x 3 x !cir.float>
-
-    %result = cir.matrix.column_major_load %ptr : <!cir.double>, %stride : 
!u64i,
-      !cir.matrix<5 x 5 x !cir.double>
-
-    %result = cir.matrix.column_major_load %ptr : <!cir.double>, %stride : 
!u64i
-      volatile, !cir.matrix<5 x 5 x !cir.double>
-    ```
-  }];
-
-  let arguments = (ins
-    Arg<CIR_PointerType, "the address to load from", [MemRead]>:$value,
-    CIR_IntType:$stride,
-    UnitAttr:$is_volatile
-  );
-
-  let results = (outs CIR_MatrixType:$result);
-
-  let assemblyFormat = [{
-    $value `:` type($value) `,`
-    $stride `:` type($stride)
-    (`volatile` $is_volatile^)?
-    `,` qualified(type($result)) attr-dict
-  }];
-}
-
-//===----------------------------------------------------------------------===//
-// MatrixColumnMajorStoreOp
+// BaseClassAddrOp
 
//===----------------------------------------------------------------------===//
 
-def CIR_MatrixColumnMajorStoreOp : CIR_Op<"matrix.column_major_store", [
-  DeclareOpInterfaceMethods<PromotableMemOpInterface>,
+def CIR_BaseClassAddrOp : CIR_Op<"base_class_addr", [
+  Pure, DeclareOpInterfaceMethods<ViewLikeOpInterface>
 ]> {
----------------
xlauko wrote:

After the rebase `CIR_BaseClassAddrOp` and `CIR_DerivedClassAddrOp` share 
CIR_ClassCastOp base. Could you put 
DeclareOpInterfaceMethods<ViewLikeOpInterface> on the class once

https://github.com/llvm/llvm-project/pull/230897
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to