[PATCH] D73051: [GlobalISel][AMDGPU] Saturating add/subtract

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 08:42:48 PST 2020


foad created this revision.
Herald added subscribers: kerbowa, Petar.Avramovic, volkan, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.

RFC: this is my first foray into GlobalISel so I'd appreciate any
feedback, especially on what level of testing to include

Add support in IRTranslator for translating the saturating add/subtract
intrinsics to new generic MIR opcodes G_SADDSAT etc. Add support in
LegalizerHelper for lowering the new opcodes in terms of G_SADDO etc.
Enable this lowering for AMDGPU so it can be tested.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73051

Files:
  llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  llvm/include/llvm/Support/TargetOpcodes.def
  llvm/include/llvm/Target/GenericOpcodes.td
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-sat.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sat.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73051.239145.patch
Type: text/x-patch
Size: 19892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/f07d9802/attachment.bin>


More information about the llvm-commits mailing list