================
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl \
+// RUN:   -ast-print -disable-llvm-passes -o - -hlsl-entry main %s \
+// RUN:   | FileCheck %s
+
+typedef float float4x4 __attribute__((matrix_type(4,4)));
+typedef float float2 __attribute__((ext_vector_type(2)));
+typedef float float3 __attribute__((ext_vector_type(3)));
+
+float4x4 gMat;
+
+[numthreads(1, 1, 1)]
+void main() {
+  float4x4 A = gMat;
+  float3 v1 = A._11_22_33;
+  float2 v2 = A._m00_m11;
----------------
hekota wrote:

```suggestion
  float3 v1 = A._12_21_32;
  float2 v2 = A._m01_m10;
```
Using different indices tests that column and row do not get accidentally mixed 
up.

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

Reply via email to