[PATCH] D143134: [AMDGPU][SDAG] attempt to custom legalize uaddo/usubo for long operands

Vikram Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 20:15:58 PST 2023


vikramRH created this revision.
vikramRH added reviewers: arsenm, foad, alex-t.
Herald added subscribers: kosarev, StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
vikramRH requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

The goal here was to eliminate the redundant compare instruction generated in addition to add/sub2. Tries to address the issue discussed here, https://github.com/RadeonOpenCompute/ROCm/issues/477

Im having to modify the instruction selection for uniform addcarry/subcarry node when one of the carry users have already been selected to VALU to avoid suboptimal pattern. I have some concerns here and would like to know if it could be done in a better way.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143134

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/lib/Target/AMDGPU/SIISelLowering.h
  llvm/test/CodeGen/AMDGPU/carryout-selection.ll
  llvm/test/CodeGen/AMDGPU/sdiv64.ll
  llvm/test/CodeGen/AMDGPU/srem64.ll
  llvm/test/CodeGen/AMDGPU/uaddo.ll
  llvm/test/CodeGen/AMDGPU/uaddsat.ll
  llvm/test/CodeGen/AMDGPU/udiv64.ll
  llvm/test/CodeGen/AMDGPU/urem64.ll
  llvm/test/CodeGen/AMDGPU/usubo.ll
  llvm/test/CodeGen/AMDGPU/usubsat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143134.494153.patch
Type: text/x-patch
Size: 157324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230202/c03e5507/attachment-0001.bin>


More information about the llvm-commits mailing list