[PATCH] D139506: [AMDGPU] Handle nnan and fast on the call in fpmed3 patterns

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 22:22:38 PST 2022


bogner created this revision.
bogner added reviewers: arsenm, foad.
Herald added subscribers: kosarev, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, mcrosier.
Herald added a project: All.
bogner requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

We were only allowing these med3 patterns if the operands were known to not be NaN, but we should also allow it if the calls to max/min have the `nnan` or `fast` flags.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139506

Files:
  llvm/lib/Target/AMDGPU/AMDGPUGISel.td
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
  llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
  llvm/lib/Target/AMDGPU/SIInstrInfo.td
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
  llvm/test/CodeGen/AMDGPU/fmed3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139506.480772.patch
Type: text/x-patch
Size: 14878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221207/67f3c114/attachment.bin>


More information about the llvm-commits mailing list