[PATCH] D83715: AMDGPU/GlobalISel: Use clamp modifier for uaddsat/usubsat

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 13:24:48 PDT 2020


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

There's an annoying asymmetry where we have signed saturating for
packed operations, but not for scalar 16-bit. We can probably add an
undef element if we have the VOP3P instruction, but leave that for
later.

      

We also have never handled this for SelectionDAG, which needs
additional work.


https://reviews.llvm.org/D83715

Files:
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/lib/Target/AMDGPU/VOP2Instructions.td
  llvm/lib/Target/AMDGPU/VOP3PInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddsat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubsat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/uaddsat.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/usubsat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83715.277548.patch
Type: text/x-patch
Size: 205801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/103eeb6a/attachment-0001.bin>


More information about the llvm-commits mailing list