From 844325824ecc1d3d11a553b784c991f8adc2c531 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Fri, 3 Apr 2026 14:57:07 -0600 Subject: [PATCH] [SM6.10][Bugfix] Fixed swapped parameter in linalg.h --- tools/clang/lib/Headers/hlsl/dx/linalg.h | 4 ++-- .../test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/clang/lib/Headers/hlsl/dx/linalg.h b/tools/clang/lib/Headers/hlsl/dx/linalg.h index 2a636662cd..3c45e39683 100644 --- a/tools/clang/lib/Headers/hlsl/dx/linalg.h +++ b/tools/clang/lib/Headers/hlsl/dx/linalg.h @@ -373,8 +373,8 @@ class Matrix { void>::type MultiplyAccumulate(const Matrix MatrixA, const Matrix MatrixB) { - __builtin_LinAlg_MatrixMatrixMultiplyAccumulate( - __handle, __handle, MatrixA.__handle, MatrixB.__handle); + __builtin_LinAlg_MatrixMatrixMultiplyAccumulate(__handle, MatrixA.__handle, + MatrixB.__handle, __handle); } }; diff --git a/tools/clang/test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl b/tools/clang/test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl index 575a367273..8d1f43f4b2 100644 --- a/tools/clang/test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl +++ b/tools/clang/test/CodeGenDXIL/hlsl/linalg/api/matrix-class.hlsl @@ -157,10 +157,10 @@ void main(uint ID : SV_GroupID) // Matrix::MultiplyAccumulate // // CHECK: %[[ACCUM4:.*]] = call %dx.types.LinAlgMatrixC9M4N4U2S1 -// CHECK-SAME: @dx.op.linAlgMatrixMultiplyAccumulate.mC9M4N4U2S1.mC9M4N4U2S1.mC9M4N4U0S1.mC9M4N4U1S1(i32 -2147483637, -// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U2S1 %[[ACCUM3]], +// CHECK-SAME: @dx.op.linAlgMatrixMultiplyAccumulate.mC9M4N4U2S1.mC9M4N4U0S1.mC9M4N4U1S1.mC9M4N4U2S1(i32 -2147483637, // CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U0S1 %[[MATA1]], -// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U1S1 %[[MATB1_2]]) +// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U1S1 %[[MATB1_2]], +// CHECK-SAME: %dx.types.LinAlgMatrixC9M4N4U2S1 %[[ACCUM3]]) // CHECK-SAME: ; LinAlgMatrixMultiplyAccumulate(matrixA,matrixB,matrixC) AccMat2.MultiplyAccumulate(MatA1, MatB1);