Fix comment typo in ExpandFCOPYSIGN#111489
Merged
Conversation
Member
|
@llvm/pr-subscribers-llvm-selectiondag Author: Ralf Jung (RalfJung) ChangesI noticed this while following #111269. It makes little sense that FCOPYSIGN would look at the sign of Full diff: https://github.com/llvm/llvm-project/pull/111489.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 42d031310d5e02..5d324f50cce457 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1657,7 +1657,7 @@ SDValue SelectionDAGLegalize::ExpandFCOPYSIGN(SDNode *Node) const {
SDValue SignBit = DAG.getNode(ISD::AND, DL, IntVT, SignAsInt.IntValue,
SignMask);
- // If FABS is legal transform FCOPYSIGN(x, y) => sign(x) ? -FABS(x) : FABS(X)
+ // If FABS is legal transform FCOPYSIGN(x, y) => SignBit(y) ? -FABS(x) : FABS(x)
EVT FloatVT = Mag.getValueType();
if (TLI.isOperationLegalOrCustom(ISD::FABS, FloatVT) &&
TLI.isOperationLegalOrCustom(ISD::FNEG, FloatVT)) {
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
c4bbf10 to
70dd9cc
Compare
dtcxzyw
approved these changes
Oct 8, 2024
Member
dtcxzyw
left a comment
There was a problem hiding this comment.
Nice catch! Please fix format before pushing.
arsenm
approved these changes
Oct 8, 2024
Contributor
Author
|
Format is fixed (I think).
Someone else will have to push the "merge" button though.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed this while following #111269. It makes little sense that FCOPYSIGN would look at the sign of
x, right? Surely this must bey. Also fix the inconsistency where it's sometimesxand sometimesX.