[all-commits] [llvm/llvm-project] dcbf2c: [Scalarizer][DirectX] support structs return types...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Mon Oct 21 09:51:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dcbf2c2ca078367fcd84feae9a51226b9761117a
      https://github.com/llvm/llvm-project/commit/dcbf2c2ca078367fcd84feae9a51226b9761117a
  Author: Farzon Lotfi <1802579+farzonl at users.noreply.github.com>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/VectorUtils.h
    M llvm/include/llvm/IR/IntrinsicsDirectX.td
    M llvm/lib/Analysis/VectorUtils.cpp
    M llvm/lib/Target/DirectX/DirectXTargetTransformInfo.cpp
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp
    A llvm/test/CodeGen/DirectX/split-double.ll
    A llvm/test/Transforms/Scalarizer/frexp.ll

  Log Message:
  -----------
  [Scalarizer][DirectX] support structs return types (#111569)

Based on this RFC:
https://discourse.llvm.org/t/rfc-allow-the-scalarizer-pass-to-scalarize-vectors-returned-in-structs/82306

LLVM intrinsics do not support out params. To get around this limitation
implementers will make intrinsics return structs to capture a return
type and an out param. This implementation detail should not impact
scalarization since these cases should be elementwise operations.

## Three changes are needed. 
- The CallInst visitor needs to be updated to handle Structs
- A new visitor is needed for `ExtractValue` instructions
- finsh needs to be update to handle structs so that insert elements are
properly propogated.

## Testing changes
- Add support for `llvm.frexp`
- Add support for `llvm.dx.splitdouble`

fixes https://github.com/llvm/llvm-project/issues/111437



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