[PATCH] D140128: DAG: Look through fneg when trying to create unsafe minnum/maxnum

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 10:59:49 PST 2022


arsenm created this revision.
arsenm added reviewers: bogner, spatel, bkramer, RKSimon, greened, foad.
Herald added subscribers: kosarev, ecnelises, hiraditya, tpr.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This makes most sense for isFNegFree targets, but shouldn't make
things worse without it. This avoids AMDGPU test regressions in a
future patch.

      

For some reason APFloat::compareAbsoluteValue is private, so compute
the neg of the constants.


https://reviews.llvm.org/D140128

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/ARM/unsafe-fneg-select-minnum-maxnum-combine.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140128.483243.patch
Type: text/x-patch
Size: 5529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/4950d2e9/attachment-0001.bin>


More information about the llvm-commits mailing list