[llvm] SelectionDAG: Use qNaN constant if FCANONICALIZE not LegalOrCustom (PR #104564)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 20:57:07 PDT 2024
================
@@ -8622,8 +8622,16 @@ SDValue TargetLowering::expandFMINIMUMNUM_FMAXIMUMNUM(SDNode *Node,
// If MinMax is NaN, let's quiet it.
if (!Flags.hasNoNaNs() && !DAG.isKnownNeverNaN(LHS) &&
!DAG.isKnownNeverNaN(RHS)) {
- SDValue MinMaxQuiet =
- DAG.getNode(ISD::FCANONICALIZE, DL, VT, MinMax, Flags);
+ SDValue MinMaxQuiet;
+ if (isOperationLegalOrCustom(ISD::FCANONICALIZE, VT)) {
----------------
wzssyqa wrote:
> This is a different change from the default change and I also dont think should be done. The correct operation is a canonicalize. This just drops payload bits for no reason
This is only used if FCANONICALIZE is not available.
https://github.com/llvm/llvm-project/pull/104564
More information about the llvm-commits
mailing list