[clang] [llvm] [HLSL][Matrix] Change MatrixSubscriptExpr flattened index to row major (PR #165666)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 30 11:56:12 PDT 2025


farzonl wrote:

> In the PR description you give the example of `int2x3 M = int2x3(1, 2, 3, 4, 5, 6); ` but this example or similar does not appear to be in any of the tests for this PR.
> 
> Should there be a test here for matrix initialization via the constructor and/or initializer list? Or does the matrix constructor test in the offload test suite suffice?

The bug isn’t in the construction it was in how we were indexing the matrix. The initialization is the same for both dxc and clang.

https://github.com/llvm/llvm-project/pull/165666


More information about the cfe-commits mailing list