[all-commits] [llvm/llvm-project] 060df7: [DXIL] Add Float `Dot` Intrinsic Lowering (#86071)

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Mon Mar 25 15:02:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 060df78cdbbf70d5a6dfff3af1d435a5a811b886
      https://github.com/llvm/llvm-project/commit/060df78cdbbf70d5a6dfff3af1d435a5a811b886
  Author: Farzon Lotfi <1802579+farzonl at users.noreply.github.com>
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGenHLSL/builtins/dot.hlsl
    M llvm/include/llvm/IR/IntrinsicsDirectX.td
    M llvm/lib/Target/DirectX/DXIL.td
    M llvm/lib/Target/DirectX/DXILOpBuilder.cpp
    M llvm/lib/Target/DirectX/DXILOpBuilder.h
    M llvm/lib/Target/DirectX/DXILOpLowering.cpp
    A llvm/test/CodeGen/DirectX/dot2_error.ll
    A llvm/test/CodeGen/DirectX/dot3_error.ll
    A llvm/test/CodeGen/DirectX/dot4_error.ll
    A llvm/test/CodeGen/DirectX/fdot.ll

  Log Message:
  -----------
  [DXIL] Add Float `Dot` Intrinsic Lowering (#86071)

Completes #83626
- `CGBuiltin.cpp` - modify `getDotProductIntrinsic` to be able to emit
`dot2`, `dot3`, and `dot4` intrinsics based on element count
- `IntrinsicsDirectX.td` - for floating point add `dot2`, `dot3`, and
`dot4` inntrinsics -`DXIL.td` add dxilop intrinsic lowering for `dot2`,
`dot3`, & `dot4`.
- `DXILOpLowering.cpp` - add vector arg flattening for dot product. 
- `DXILOpBuilder.h` - modify `createDXILOpCall` to take a smallVector
instead of an iterator
- `DXILOpBuilder.cpp` - modify `createDXILOpCall` by moving the small
vector up to the calling function in `DXILOpLowering.cpp`.
- Moving one function up gives us access to the `CallInst` and
`Function` which were needed to distinguish the dot product intrinsics
and get the operands without using the iterator.



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