[PATCH] D90052: AMDGPU/GlobalISel: Add clamp combine for IEEE=false

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:43:42 PDT 2020


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

Add clamp combine for IEEE mode set to false (shaders prefer this setting).
Source is fminnum(fmaxnum(Val, K0), K1 <https://reviews.llvm.org/K1>) or fmaxnum(fminnum(Val, K1 <https://reviews.llvm.org/K1>), K0)
with K0=0.0 and K1 <https://reviews.llvm.org/K1>=1.0 or fmed3 intrinsic with 0.0 and 1.0 as two out of
three operands.


https://reviews.llvm.org/D90052

Files:
  llvm/lib/Target/AMDGPU/AMDGPUCombine.td
  llvm/lib/Target/AMDGPU/AMDGPUGISel.td
  llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
  llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/clamp.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-clamp.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90052.300312.patch
Type: text/x-patch
Size: 20525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201023/1d34382a/attachment.bin>


More information about the llvm-commits mailing list