Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented May 12, 2025

Fuzzy 0 handling is no longer a property assumed of these opcodes.

Fuzzy 0 handling is no longer a property assumed of these opcodes.
@arsenm arsenm added the llvm:SelectionDAG SelectionDAGISel as well label May 12, 2025 — with Graphite App
Copy link
Contributor Author

arsenm commented May 12, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm added the floating-point Floating-point math label May 12, 2025 — with Graphite App
@llvmbot
Copy link
Member

llvmbot commented May 12, 2025

@llvm/pr-subscribers-llvm-selectiondag

Author: Matt Arsenault (arsenm)

Changes

Fuzzy 0 handling is no longer a property assumed of these opcodes.


Full diff: https://github.com/llvm/llvm-project/pull/139615.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp (+1-3)
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 856e9d813bcdd..a476b191abf62 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -8490,9 +8490,7 @@ TargetLowering::createSelectForFMINNUM_FMAXNUM(SDNode *Node,
     SDValue Op1 = Node->getOperand(0);
     SDValue Op2 = Node->getOperand(1);
     SDValue SelCC = DAG.getSelectCC(SDLoc(Node), Op1, Op2, Op1, Op2, Pred);
-    // Copy FMF flags, but always set the no-signed-zeros flag
-    // as this is implied by the FMINNUM/FMAXNUM semantics.
-    SelCC->setFlags(Node->getFlags() | SDNodeFlags::NoSignedZeros);
+    SelCC->setFlags(Node->getFlags());
     return SelCC;
   }
 

@arsenm arsenm marked this pull request as ready for review May 12, 2025 20:04
@arsenm arsenm merged commit 2f9323b into main May 13, 2025
16 checks passed
@arsenm arsenm deleted the users/arsenm/dag/stop-setting-nsz-minnum-maxnum-expansion branch May 13, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

floating-point Floating-point math llvm:SelectionDAG SelectionDAGISel as well

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants