[clang] [Matrix] Add a row\col major toggle in the clang driver (PR #167628)
Florian Hahn via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 21 06:14:33 PST 2025
================
@@ -434,6 +434,7 @@ ENUM_LANGOPT(RegisterStaticDestructors, RegisterStaticDestructorsKind, 2,
LANGOPT(RegCall4, 1, 0, NotCompatible, "Set __regcall4 as a default calling convention to respect __regcall ABI v.4")
LANGOPT(MatrixTypes, 1, 0, NotCompatible, "Enable or disable the builtin matrix type")
+ENUM_LANGOPT(DefaultMatrixMemoryLayout, MatrixMemoryLayout, 1, MatrixColMajor, NotCompatible, "Defines the default memory Layout for matrices")
----------------
fhahn wrote:
I think you have to also prevent using builtin_column_major_load/store (or preferably update LowerMatrixIntrinsics), because currently using them in row-major mode causes a crash: https://clang.godbolt.org/z/1Gd41Gx7P
https://github.com/llvm/llvm-project/pull/167628
More information about the cfe-commits
mailing list