[PATCH] D91716: AMDGPU/GlobalISel: Calculate isKnownNeverNaN for fminnum and fmaxnum

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 08:29:26 PST 2020


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: arsenm, foad.
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.

G_FMINNUM_IEEE and G_FMAXNUM_IEEE are never SNaN by definition.
When IEEE is set to true G_FMINNUM and G_FMAXNUM are lowered to
G_FMINNUM_IEEE and G_FMAXNUM_IEEE meaning they are never SNaN in
this mode. By default G_FMINNUM and G_FMAXNUM may be SNaN,
but since this might be target dependent allow option to override
default behavior via isKnownNeverNaNForMI in TargetLowering.


https://reviews.llvm.org/D91716

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/GlobalISel/Utils.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
  llvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmaxnum.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fminnum.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91716.306124.patch
Type: text/x-patch
Size: 20585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/a7c7f83b/attachment.bin>


More information about the llvm-commits mailing list