[all-commits] [llvm/llvm-project] 95bcab: [DAGCombiner] Require ninf for sqrt recip estimation

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Wed Apr 1 01:24:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 95bcab8272ced7444bc25353784de96ad9375c02
      https://github.com/llvm/llvm-project/commit/95bcab8272ced7444bc25353784de96ad9375c02
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/NVPTX/fast-math.ll
    M llvm/test/CodeGen/NVPTX/sqrt-approx.ll
    M llvm/test/CodeGen/PowerPC/fmf-propagation.ll
    M llvm/test/CodeGen/X86/sqrt-fastmath-mir.ll
    M llvm/test/CodeGen/X86/sqrt-fastmath.ll

  Log Message:
  -----------
  [DAGCombiner] Require ninf for sqrt recip estimation

Currently, DAG combiner uses (fmul (rsqrt x) x) to estimate square
root of x. However, this method would return NaN if x is +Inf, which
is incorrect.

Reviewed By: spatel

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




More information about the All-commits mailing list