[clang] [Matrix][HLSL] Fix transpose matrix layout bugs (PR #202486)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 13:47:40 PDT 2026
================
@@ -106,20 +106,57 @@ export float2x2 mat_mat_cm_rm(column_major float2x3 a, row_major float3x2 b) { r
// CHECK: [[T:%.*]] = call {{.*}} <6 x float> @llvm.matrix.transpose.v6f32(<6 x float> [[BMat]], i32 2, i32 3)
// CHECK: call {{.*}} <4 x float> @llvm.matrix.multiply.v4f32.v6f32.v6f32(<6 x float> [[AMat]], <6 x float> [[T]], i32 2, i32 3, i32 2)
-// -----------------------------------------------------------------------------
-// __builtin_hlsl_transpose: row-major operand swaps Rows/Cols passed to the
-// underlying intrinsic.
-// -----------------------------------------------------------------------------
+// Column-major return: result transform tracks the TU default, not the keyword.
----------------
hekota wrote:
The keyword should always override the TU default, no?
https://github.com/llvm/llvm-project/pull/202486
More information about the cfe-commits
mailing list