[PATCH] D11829: AMDGPU/SI: Re-define AMDGPUISD:CLAMP as always clamping between 0.0. and 1.0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 21:15:18 PST 2017


arsenm updated this revision to Diff 89014.
arsenm added a reviewer: tstellar.
arsenm added a comment.

Change implementation to use max instead of add.
min/max/med3 do not flush denormals regardless of the mode,
so it is OK to use it whether or not they are enabled.

      

Also allow using clamp with f16, and use knowledge
of dx10_clamp.


https://reviews.llvm.org/D11829

Files:
  lib/Target/AMDGPU/AMDGPU.td
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  lib/Target/AMDGPU/AMDGPUInstrInfo.td
  lib/Target/AMDGPU/AMDGPUInstructions.td
  lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.h
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIISelLowering.h
  lib/Target/AMDGPU/SIInstrInfo.td
  lib/Target/AMDGPU/SIInstructions.td
  test/CodeGen/AMDGPU/clamp.ll
  test/CodeGen/AMDGPU/hsa-fp-mode.ll
  test/CodeGen/AMDGPU/llvm.AMDGPU.clamp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11829.89014.patch
Type: text/x-patch
Size: 41717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170218/95879aa8/attachment.bin>


More information about the llvm-commits mailing list