[all-commits] [llvm/llvm-project] 54d755: DAG: Fix incorrect folding of fmul -1 to fneg

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Sep 14 18:25:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54d755a034362814bd7a0b90f172cbba39729cf4
      https://github.com/llvm/llvm-project/commit/54d755a034362814bd7a0b90f172cbba39729cf4
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2021-09-14 (Tue, 14 Sep 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/arm64-fmadd.ll
    M llvm/test/CodeGen/AArch64/fp16_intrinsic_scalar_3op.ll
    M llvm/test/CodeGen/AMDGPU/fneg-combines.ll
    M llvm/test/CodeGen/ARM/fnegs.ll
    M llvm/test/CodeGen/Hexagon/opt-fneg.ll
    M llvm/test/CodeGen/PowerPC/combine-fneg.ll

  Log Message:
  -----------
  DAG: Fix incorrect folding of fmul -1 to fneg

The fmul is a canonicalizing operation, and fneg is not so this would
break denormals that need flushing and also would not quiet signaling
nans. Fold to fsub instead, which is also canonicalizing.




More information about the All-commits mailing list