[PATCH] D90051: AMDGPU/GlobalISel: Add floating point med3 combine for IEEE=false

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:42:35 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 floating point version of med3 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) where K0 and K1 <https://reviews.llvm.org/K1> are constants and K0 < K1 <https://reviews.llvm.org/K1>.
Combine only when floating point constants K0 and K1 <https://reviews.llvm.org/K1> can be inlined.


https://reviews.llvm.org/D90051

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/fmed3.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-fmed3.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90051.300311.patch
Type: text/x-patch
Size: 16747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201023/c73867c9/attachment.bin>


More information about the llvm-commits mailing list