[all-commits] [llvm/llvm-project] 8e69c3: [DAGCombiner] Fold fmin/fmax with INF / FLT_MAX

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Sep 14 10:59:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e69c3cde8eed94be226bdef1ff6cedda3a33bc4
      https://github.com/llvm/llvm-project/commit/8e69c3cde8eed94be226bdef1ff6cedda3a33bc4
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/ARM/fminmax-folds.ll

  Log Message:
  -----------
  [DAGCombiner] Fold fmin/fmax with INF / FLT_MAX

Similar to D87415, this folds the various float min/max opcodes
with a constant INF or -INF operand, or FLT_MAX / -FLT_MAX operand
if the ninf flag is set. Some of the folds are only possible under
nnan.

The fminnum(X, INF) with nnan and fmaxnum(X, -INF) with nnan cases
are needed to improve the VECREDUCE_FMIN/FMAX lowerings on X86,
the rest is here for the sake of completeness.

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




More information about the All-commits mailing list