[PATCH] D123835: AMDGPU/SDAG: Refine the fold to v_mad_[iu]64_[iu]32

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 15:59:37 PDT 2022


nhaehnle updated this revision to Diff 423758.
nhaehnle added a comment.

- use hasSMulHi()
- tweak the heuristics for when not to fold based on multiple uses:
  - always fold when multiplication is fast
  - otherwise, fold unless there is one non-foldable use or three foldable uses; this is aimed at reducing cycle counts with code density as a tie-breaker


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123835/new/

https://reviews.llvm.org/D123835

Files:
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/atomic_optimizations_global_pointer.ll
  llvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
  llvm/test/CodeGen/AMDGPU/mad_64_32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123835.423758.patch
Type: text/x-patch
Size: 22031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220419/ac2701fe/attachment.bin>


More information about the llvm-commits mailing list