[PATCH] D115952: [DAG] Improve FMINNUM/FMAXNUM/FMINIMUM/FMAXIMUM constant folding

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 17 10:23:40 PST 2021


RKSimon created this revision.
RKSimon added reviewers: spatel, sabuasal, sdesmalen.
Herald added subscribers: mstorsjo, ecnelises, steven.zhang, hiraditya.
RKSimon requested review of this revision.
Herald added a project: LLVM.

Merge the node combines into a common DAGCombiner::visitFMinMax (like we do for IMINMAX).

Move the constant folding into SelectionDAG::foldConstantFPMath.

This allows us to fold the vecreduce-propagate-sd-flags.ll test as it reduce constants - so I've refactored it to take variables instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115952

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/AArch64/vecreduce-propagate-sd-flags.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115952.395161.patch
Type: text/x-patch
Size: 5758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211217/2ba112f3/attachment.bin>


More information about the llvm-commits mailing list