[clang] Enable matrices in HLSL (PR #111415)

Greg Roth via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 12:59:52 PST 2024


================
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
   // expected-error at -1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}}
 
   a = b + &c;
-  // expected-error at -1 {{invalid operands to binary expression ('sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float  __attribute__((matrix_type(10, 5)))*'))}}
-  // expected-error at -2 {{casting 'sx10x5_t *' (aka 'float  __attribute__((matrix_type(10, 5)))*') to incompatible type 'float'}}
+  // expected-error at -1 {{invalid operands to binary expression ('sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))') and 'sx10x5_t *' (aka 'float * __attribute__((matrix_type(10, 5)))'))}}
----------------
pow2clk wrote:

I created an issue for this: https://github.com/llvm/llvm-project/issues/114868 It's not really related to HLSL as we don't have pointers or references (yet). I have a tentative fix, but I'd like to see if anyone has thoughts on the further impact it will have on existing type printing.

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


More information about the cfe-commits mailing list