================
@@ -2129,6 +2316,25 @@ bool Compiler<Emitter>::visitInitList(ArrayRef<const
Expr *> Inits,
return true;
}
+ if (const auto *MT = QT->getAs<ConstantMatrixType>()) {
+ unsigned NumElts = MT->getNumElementsFlattened();
+ assert(Inits.size() == NumElts);
+
+ QualType ElemQT = MT->getElementType();
+ PrimType ElemT = classifyPrim(ElemQT);
+
+ // InitListExpr elements are in column-major order.
+ // Store in row-major order to match APValue convention.
+ for (unsigned I = 0; I < NumElts; ++I) {
----------------
tbaederr wrote:
```suggestion
for (unsigned I = 0; I != NumElts; ++I) {
```
https://github.com/llvm/llvm-project/pull/183424
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits