@@ -20,7 +20,6 @@ void main(uint3 tid : SV_DispatchThreadId)
2020// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_1]]
2121// CHECK: [[word1:%\d+]] = OpLoad %uint [[ptr]]
2222// CHECK: [[val2:%\d+]] = OpUConvert %ushort [[word1]]
23- // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v3ushort [[val0]] [[val1]] [[val2]]
2423// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_1]]
2524// CHECK: [[word1:%\d+]] = OpLoad %uint [[ptr]]
2625// CHECK: [[shifted_word1:%\d+]] = OpShiftRightLogical %uint [[word1]] %uint_16
@@ -33,7 +32,8 @@ void main(uint3 tid : SV_DispatchThreadId)
3332// CHECK: [[word2:%\d+]] = OpLoad %uint [[ptr]]
3433// CHECK: [[shifted_word2:%\d+]] = OpShiftRightLogical %uint [[word2]] %uint_16
3534// CHECK: [[val5:%\d+]] = OpUConvert %ushort [[shifted_word2:%\d+]]
36- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3ushort [[val3]] [[val4]] [[val5]]
35+ // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v3ushort [[val0]] [[val2]] [[val4]]
36+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3ushort [[val1]] [[val3]] [[val5]]
3737// CHECK: [[matrix:%\d+]] = OpCompositeConstruct %_arr_v3ushort_uint_2 [[row0]] [[row1]]
3838// CHECK: OpStore %u16 [[matrix]]
3939 uint16_t2x3 u16 = buf.Load<uint16_t2x3>(tid.x);
@@ -48,18 +48,27 @@ void main(uint3 tid : SV_DispatchThreadId)
4848// CHECK: [[word1:%\d+]] = OpLoad %uint [[ptr]]
4949// CHECK: [[val1:%\d+]] = OpBitcast %int [[word1:%\d+]]
5050// CHECK:[[index_2:%\d+]] = OpIAdd %uint [[index_1]] %uint_1
51- // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v2int [[val0]] [[val1]]
5251// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_2]]
5352// CHECK: [[word2:%\d+]] = OpLoad %uint [[ptr]]
5453// CHECK: [[val2:%\d+]] = OpBitcast %int [[word2]]
5554// CHECK:[[index_3:%\d+]] = OpIAdd %uint [[index_2]] %uint_1
5655// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_3]]
5756// CHECK: [[word3:%\d+]] = OpLoad %uint [[ptr]]
5857// CHECK: [[val3:%\d+]] = OpBitcast %int [[word3]]
59- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v2int [[val2]] [[val3]]
60- // CHECK: [[matrix:%\d+]] = OpCompositeConstruct %_arr_v2int_uint_2 [[row0]] [[row1]]
61- // CHECK: OpStore %i [[matrix]]
62- int2x2 i = buf.Load<int2x2 >(tid.x);
58+ // CHECK:[[index_4:%\d+]] = OpIAdd %uint [[index_3]] %uint_1
59+ // CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_4]]
60+ // CHECK: [[word4:%\d+]] = OpLoad %uint [[ptr]]
61+ // CHECK: [[val4:%\d+]] = OpBitcast %int [[word4]]
62+ // CHECK:[[index_5:%\d+]] = OpIAdd %uint [[index_4]] %uint_1
63+ // CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_5]]
64+ // CHECK: [[word5:%\d+]] = OpLoad %uint [[ptr]]
65+ // CHECK: [[val5:%\d+]] = OpBitcast %int [[word5]]
66+ // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v2int [[val0]] [[val3]]
67+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v2int [[val1]] [[val4]]
68+ // CHECK: [[row2:%\d+]] = OpCompositeConstruct %v2int [[val2]] [[val5]]
69+ // CHECK: [[matrix:%\d+]] = OpCompositeConstruct %_arr_v2int_uint_3 [[row0]] [[row1]] [[row2]]
70+ // CHECK: OpStore %j [[matrix]]
71+ int3x2 j = buf.Load<int3x2 >(tid.x);
6372
6473// ********* 64-bit matrix ********************
6574
@@ -85,7 +94,6 @@ void main(uint3 tid : SV_DispatchThreadId)
8594// CHECK: [[val1_ulong:%\d+]] = OpBitwiseOr %ulong [[word2_ulong]] [[word3_ulong_shifted]]
8695// CHECK: [[val1:%\d+]] = OpBitcast %double [[val1_ulong]]
8796// CHECK: [[index_4:%\d+]] = OpIAdd %uint [[index_3]] %uint_1
88- // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v2double [[val0]] [[val1]]
8997// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_4]]
9098// CHECK: [[word4:%\d+]] = OpLoad %uint [[ptr]]
9199// CHECK: [[index_5:%\d+]] = OpIAdd %uint [[index_4]] %uint_1
@@ -107,7 +115,8 @@ void main(uint3 tid : SV_DispatchThreadId)
107115// CHECK: [[word7_ulong_shifted:%\d+]] = OpShiftLeftLogical %ulong [[word7_ulong]] %uint_32
108116// CHECK: [[val3_ulong:%\d+]] = OpBitwiseOr %ulong [[word6_ulong]] [[word7_ulong_shifted]]
109117// CHECK: [[val3:%\d+]] = OpBitcast %double [[val3_ulong]]
110- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v2double [[val2]] [[val3]]
118+ // CHECK: [[row0:%\d+]] = OpCompositeConstruct %v2double [[val0]] [[val2]]
119+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v2double [[val1]] [[val3]]
111120// CHECK: [[matrix:%\d+]] = OpCompositeConstruct %mat2v2double [[row0]] [[row1]]
112121// CHECK: OpStore %f64 [[matrix]]
113122 float64_t2x2 f64 = buf.Load<float64_t2x2>(tid.x);
@@ -118,35 +127,35 @@ void main(uint3 tid : SV_DispatchThreadId)
118127// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_0]]
119128// CHECK: [[index_1:%\d+]] = OpIAdd %uint [[index_0]] %uint_1
120129// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_1]]
121- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
122130// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_1]]
123131// CHECK: [[index_2:%\d+]] = OpIAdd %uint [[index_1]] %uint_1
124132// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_2]]
125133// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_2]]
126134// CHECK: [[index_3:%\d+]] = OpIAdd %uint [[index_2]] %uint_1
135+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
127136// CHECK: [[row2:%\d+]] = OpCompositeConstruct %v3half
128137// CHECK: [[matrix_1:%\d+]] = OpCompositeConstruct %mat2v3half [[row1]] [[row2]]
129138// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_3]]
130139// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_3]]
131140// CHECK: [[index_4:%\d+]] = OpIAdd %uint [[index_3]] %uint_1
132141// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_4]]
133- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
134142// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_4]]
135143// CHECK: [[index_5:%\d+]] = OpIAdd %uint [[index_4]] %uint_1
136144// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_5]]
137145// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_5]]
138146// CHECK: [[index_6:%\d+]] = OpIAdd %uint [[index_5]] %uint_1
147+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
139148// CHECK: [[row2:%\d+]] = OpCompositeConstruct %v3half
140149// CHECK: [[matrix_2:%\d+]] = OpCompositeConstruct %mat2v3half [[row1]] [[row2]]
141150// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_6]]
142151// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_6]]
143152// CHECK: [[index_7:%\d+]] = OpIAdd %uint [[index_6]] %uint_1
144153// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_7]]
145- // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
146154// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_7]]
147155// CHECK: [[index_8:%\d+]] = OpIAdd %uint [[index_7]] %uint_1
148156// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_8]]
149157// CHECK: [[ptr:%\d+]] = OpAccessChain %_ptr_Uniform_uint %buf %uint_0 [[index_8]]
158+ // CHECK: [[row1:%\d+]] = OpCompositeConstruct %v3half
150159// CHECK: [[row2:%\d+]] = OpCompositeConstruct %v3half
151160// CHECK: [[matrix_3:%\d+]] = OpCompositeConstruct %mat2v3half [[row1]] [[row2]]
152161// CHECK: [[matrix_array:%\d+]] = OpCompositeConstruct %_arr_mat2v3half_uint_3 [[matrix_1]] [[matrix_2]] [[matrix_3]]
0 commit comments