farzonl wrote:

> The behavior change is that in HLSL-mode the `matrix_type` attribute has 
> reduced size limits.
> 
> > We are confirming that the constraint is applied on matrix<int, 5, 5> mat3;
> > https://github.com/llvm/llvm-project/blob/b358af10a7b783e771a1e5ad6ded3e3535648b06/clang/test/SemaHLSL/BuiltIns/matrix-basic_types-errors.hlsl#L10-L12
> 
> This is enforced by the `matrix` template, you're changing the implementation 
> to _also_ enforce this on the `matrix_type` attribute.
> 
> > Since the behavior differences are tested. I’ve just added an explicit 
> > compiler invocation test to confirm this number changes When we change the 
> > language mode to HLSL. I think that’s all you wanted?
> 
> With this PR, clang should generate an error on this code:
> 
> ```c++
> using float8x8 = __attribute__((matrix_type(8,8))) float;
> ```
> 
> Which would not have been generated without this PR (See [Compiler 
> Explorer](https://godbolt.org/z/Gh53nEGEs))

I think there is a misunderstanding here. this change doesn't impact any 
constraints on `matrix_type`. we are just moving where the dim variable is 
stored to a language option. We have a different ticket to change size 
constraints for the unaliased version of `matrix_type` here: 
https://github.com/llvm/llvm-project/issues/116710

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

Reply via email to