================
@@ -2440,6 +2443,35 @@ RValue CodeGenFunction::EmitLoadOfLValue(LValue LV,
SourceLocation Loc) {
Builder.CreateLoad(LV.getMatrixAddress(), LV.isVolatileQualified());
return RValue::get(Builder.CreateExtractElement(Load, Idx, "matrixext"));
}
+ if (LV.isMatrixRow()) {
+ QualType MatTy = LV.getType();
+ const ConstantMatrixType *MT = MatTy->castAs<ConstantMatrixType>();
+
+ unsigned NumRows = MT->getNumRows();
+ unsigned NumCols = MT->getNumColumns();
+
+ llvm::Value *MatrixVec = EmitLoadOfScalar(LV, Loc);
+
+ llvm::Value *Row = LV.getMatrixRowIdx();
+ llvm::Value *Result =
+ llvm::PoisonValue::get(ConvertType(LV.getType())); // <NumCols x T>
----------------
farzonl wrote:
There is no matrix llvm type. `ConvertType` will create the llvm fixed vector
type.
https://github.com/llvm/llvm-project/pull/170779
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits