[all-commits] [llvm/llvm-project] 92be64: [FPEnv][AMDGPU] Disable FSUB(-0, X)->FNEG(X) DAGCom...

llvmbot via All-commits all-commits at lists.llvm.org
Mon Jan 4 12:49:14 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 92be640bd7d4fbc8e032a0aa81381a0246efa0be
      https://github.com/llvm/llvm-project/commit/92be640bd7d4fbc8e032a0aa81381a0246efa0be
  Author: Cameron McInally <mcinally at cray.com>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AMDGPU/clamp-modifier.ll
    M llvm/test/CodeGen/AMDGPU/clamp.ll
    M llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
    M llvm/test/CodeGen/AMDGPU/fma-combine.ll
    M llvm/test/CodeGen/AMDGPU/fneg-combines.ll
    M llvm/test/CodeGen/AMDGPU/fpext-free.ll
    M llvm/test/CodeGen/AMDGPU/fptrunc.f16.ll
    M llvm/test/CodeGen/AMDGPU/known-never-snan.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fmad.ftz.ll
    M llvm/test/CodeGen/AMDGPU/mad-combine.ll
    M llvm/test/CodeGen/AMDGPU/mad-mix.ll
    M llvm/test/CodeGen/AMDGPU/rcp-pattern.ll
    M llvm/test/CodeGen/AMDGPU/rsq.ll
    M llvm/test/CodeGen/AMDGPU/v_mac.ll
    M llvm/test/CodeGen/AMDGPU/v_mac_f16.ll

  Log Message:
  -----------
  [FPEnv][AMDGPU] Disable FSUB(-0,X)->FNEG(X) DAGCombine when subnormals are flushed

This patch disables the FSUB(-0,X)->FNEG(X) DAG combine when we're flushing subnormals. It requires updating the existing AMDGPU tests to use the fneg IR instruction, in place of the old fsub(-0,X) canonical form, since AMDGPU is the only backend currently checking the DenormalMode flags.

Note that this will require follow-up optimizations to make sure the FSUB(-0,X) form is handled appropriately

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




More information about the All-commits mailing list