[clang] [HLSL] Add matrix constructors using initalizer lists (PR #162743)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 15:41:48 PDT 2025
https://github.com/llvm-beanz commented:
Your testing is focused on `CXXFunctionalCastExpr`, but the implementation of that should be the same as the general initializer list implementation (it is for vectors), so the testing also needs to cover those cases.
Things like:
```
[numthreads(1,1,1)]
void main() {
float4x2 m = {1.xxx, 2.xx, 3.x, 4.xx};
struct S { float2x2 x; float2x2 y;};
S s = {m};
float2x2 m2 = {0.xxxx};
int4x4 m3 = {m2, m2, m2, m2};
}
```
https://godbolt.org/z/WaK51nWTb
https://github.com/llvm/llvm-project/pull/162743
More information about the cfe-commits
mailing list