[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 16 10:46:42 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6055
+ bool isNotNaN =
+ DAG.isKnownNeverNaN(Operand1) && DAG.isKnownNeverNaN(Operand2);
+ bool isNotSNaN =
----------------
Check operand 2 first, it's canonically simpler
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6087-6092
+ if (isNotSNaN)
+ return ISD::FMINNUM_IEEE;
+
+ if (isFMINNUM_FMAXNUM_Supported)
+ return ISD::FMINNUM;
+
----------------
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
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