[all-commits] [llvm/llvm-project] da17ce: [DirectX] Use scalar arguments for @llvm.dx.dot in...

Justin Bogner via All-commits all-commits at lists.llvm.org
Mon Apr 14 10:34:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da17ced11b1cf44b433cb2b850978df4b6bff279
      https://github.com/llvm/llvm-project/commit/da17ced11b1cf44b433cb2b850978df4b6bff279
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2025-04-14 (Mon, 14 Apr 2025)

  Changed paths:
    M clang/lib/CodeGen/TargetBuiltins/DirectX.cpp
    M clang/test/CodeGenDirectX/Builtins/dot2add.c
    M clang/test/CodeGenHLSL/builtins/dot2add.hlsl
    M llvm/include/llvm/IR/IntrinsicsDirectX.td
    M llvm/lib/Target/DirectX/DXIL.td
    M llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
    M llvm/lib/Target/DirectX/DXILOpLowering.cpp
    M llvm/test/CodeGen/DirectX/dot2_error.ll
    M llvm/test/CodeGen/DirectX/dot2add.ll
    M llvm/test/CodeGen/DirectX/dot3_error.ll
    M llvm/test/CodeGen/DirectX/dot4_error.ll
    M llvm/test/CodeGen/DirectX/fdot.ll
    M llvm/test/CodeGen/DirectX/normalize.ll

  Log Message:
  -----------
  [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (#134570)

The `dx.dot2`, `dot3`, and `dot4` intrinsics exist purely to lower
`dx.fdot`, and they map exactly to the DXIL ops of the same name. Using
vectors for their arguments adds unnecessary complexity and causes us to
have vector operations that are not trivial to lower post-scalarizer.

Similarly, the `dx.dot2add` intrinsic is overly generic for something
that only needs to lower to a single `dot2AddHalf` DXIL op. Update its
signature to match the operation it lowers to.

Fixes #134569.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list