[llvm] fix comment typo in ExpandFCOPYSIGN (PR #111489)
Ralf Jung via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 00:07:28 PDT 2024
https://github.com/RalfJung updated https://github.com/llvm/llvm-project/pull/111489
>From 70dd9ccadbe2f78aa5a3883afa5226a285c2d34f Mon Sep 17 00:00:00 2001
From: Ralf Jung <post at ralfj.de>
Date: Tue, 8 Oct 2024 08:58:52 +0200
Subject: [PATCH] fix comment typo in ExpandFCOPYSIGN
---
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 42d031310d5e02..ea22b4670d6f1f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1657,7 +1657,8 @@ 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)) {
More information about the llvm-commits
mailing list