[PATCH] D155267: [DAGCombiner] Change foldAndOrOfSETCC() to optimize and/or patterns with floating points.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 14:48:13 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6087-6092
+ if (isNotSNaN)
+ return ISD::FMINNUM_IEEE;
+
+ if (isFMINNUM_FMAXNUM_Supported)
+ return ISD::FMINNUM;
+
----------------
kmitropoulou wrote:
> arsenm wrote:
> > arsenm wrote:
> > > Can this be reordered to try FMINNUM/FMAXNUM first?
> > The point to f this was to try to avoid recursing 6 times to call isKnownNeverSNan, you can try to avoid that in the case where you don't need to worry about it
> Thank you Matt for the explanation :)
Beyond the operand check, I also meant to not eagerly call these first thing in the function. like you can perform the check down at the (isNotSNaN). e.g.
add a bothOperandsNotSNan() helper, and call it in place of the bool isNotSNaN variable
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155267/new/
https://reviews.llvm.org/D155267
More information about the llvm-commits
mailing list