[PATCH] D86403: [DAGCombine]: Fold X/Sqrt(X) to Sqrt(X).
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 13:15:58 PDT 2020
spatel added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13358
+ if ((Options.NoNaNsFPMath || Flags.hasNoNaNs()) &&
+ (Options.UnsafeFPMath || Flags.hasAllowReassociation()))
+ if (N1.getOpcode() == ISD::FSQRT && N0 == N1.getOperand(0)) {
----------------
Also, 'reassoc' generally means anything can happen, but if we want to be safer, we could require 'nsz' because this transform would change the result for a -0.0 input.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86403/new/
https://reviews.llvm.org/D86403
More information about the llvm-commits
mailing list