[all-commits] [llvm/llvm-project] f8ef7c: [DAGCombiner] Require ninf for division estimation
Qiu Chaofan via All-commits
all-commits at lists.llvm.org
Sun Jun 14 08:01:40 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f8ef7c99a0199084609ce0e938ea1ff2c3636f09
https://github.com/llvm/llvm-project/commit/f8ef7c99a0199084609ce0e938ea1ff2c3636f09
Author: Qiu Chaofan <qiucofan at cn.ibm.com>
Date: 2020-06-14 (Sun, 14 Jun 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AMDGPU/fdiv.ll
M llvm/test/CodeGen/PowerPC/combine-fneg.ll
M llvm/test/CodeGen/PowerPC/fdiv.ll
M llvm/test/CodeGen/PowerPC/qpx-recipest.ll
M llvm/test/CodeGen/PowerPC/recipest.ll
M llvm/test/CodeGen/PowerPC/repeated-fp-divisors.ll
M llvm/test/CodeGen/PowerPC/vsx-recip-est.ll
M llvm/test/CodeGen/X86/fdiv-combine-vec.ll
Log Message:
-----------
[DAGCombiner] Require ninf for division estimation
Current implementation of division estimation isn't correct for some
cases like 1.0/0.0 (result is nan, not expected inf).
And this change exposes a potential infinite loop: we use
isConstOrConstSplatFP in combineRepeatedFPDivisors to look up if the
divisor is some constant. But it doesn't work after legalized on some
platforms. This patch restricts the method to act before LegalDAG.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D80542
More information about the All-commits
mailing list