================
@@ -7192,6 +7190,25 @@ void CodeGenFunction::FlattenAccessAndTypeLValue(
                                   Base.getBaseInfo(), TBAAAccessInfo());
         AccessList.emplace_back(LV);
       }
+    } else if (const auto *MT = dyn_cast<ConstantMatrixType>(T)) {
+      // Matrices are represented as flat arrays in memory, but has a vector
+      // value type. So we use ConvertMatrixAddress to convert the address from
+      // array to vector, and extract elements similar to the vector case 
above.
+      // The order in which we iterate over the elements is sequentially in
+      // memory; whether the matrix is in row- or column-major order does not
+      // matter.
----------------
Icohedron wrote:

Actually yes, I think you are correct. This is a Clang issue and the library 
shader example for DXC is incorrect.

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

Reply via email to