[all-commits] [llvm/llvm-project] 589c94: [DAG] Fix and expand fmin/fmax reassociation fold.

David Green via All-commits all-commits at lists.llvm.org
Fri Jun 23 06:45:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 589c940eb3d802fac60ad6171f0deee1ea033a2b
      https://github.com/llvm/llvm-project/commit/589c940eb3d802fac60ad6171f0deee1ea033a2b
  Author: David Green <david.green at arm.com>
  Date:   2023-06-23 (Fri, 23 Jun 2023)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/double_reduct.ll
    M llvm/test/CodeGen/AArch64/sve-doublereduct.ll
    M llvm/test/CodeGen/RISCV/double_reduct.ll
    M llvm/test/CodeGen/Thumb2/mve-doublereduct.ll

  Log Message:
  -----------
  [DAG] Fix and expand fmin/fmax reassociation fold.

This call to reassociateReduction is used by both fminnum/fmaxnum and
fminimum/fmaximum. In adding support for fminimum/fmaximum we appear to be
fixing the use of an incorrect reduction type, which should have only applied
to minnum/maxnum.

I also believe that it doesn't need nsz and reassoc to perform the
reassociation. For float min/max it should always be valid.

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




More information about the All-commits mailing list