[clang] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 09:17:31 PDT 2025


================
@@ -385,12 +385,17 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
            "Intrinsic dot2add is only allowed for dxil architecture");
     Value *A = EmitScalarExpr(E->getArg(0));
     Value *B = EmitScalarExpr(E->getArg(1));
-    Value *C = EmitScalarExpr(E->getArg(2));
+    Value *Acc = EmitScalarExpr(E->getArg(2));
+
+    Value *AX = Builder.CreateExtractElement(A, Builder.getSize(0));
----------------
farzonl wrote:

im not sure how i feel about scalarization in the frontend. This seems like a one off so have a minor concern that changes like this will make the vectorized DXIL coming in 6.9 have special cases in the frontend.  This is a concern for the future so take it with a grain of salt.

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


More information about the cfe-commits mailing list