================
@@ -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>
----------------
hekota wrote:
Isn't `LV.getType()` equal to `ConstantMatrixType` and not a `<NumCols x T>`
vector type? (see lines 2447-8 above).
https://github.com/llvm/llvm-project/pull/170779
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits