[all-commits] [llvm/llvm-project] c1340b: [DAG] Improve FMINNUM/FMAXNUM/FMINIMUM/FMAXIMUM co...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Dec 19 04:18:32 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1340b9e78482aff3f0b55bfacc9c9b753ac2f53
      https://github.com/llvm/llvm-project/commit/c1340b9e78482aff3f0b55bfacc9c9b753ac2f53
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-12-19 (Sun, 19 Dec 2021)

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

  Log Message:
  -----------
  [DAG] Improve FMINNUM/FMAXNUM/FMINIMUM/FMAXIMUM constant folding

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 reduces constants - so I've refactored it to take variables instead.

Differential Revision: https://reviews.llvm.org/D115952




More information about the All-commits mailing list