[llvm] [X86][SelectionDAG] - Add support for llvm.canonicalize intrinsic (PR #106370)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 07:57:08 PDT 2024
================
@@ -58143,6 +58144,42 @@ static SDValue combineINTRINSIC_VOID(SDNode *N, SelectionDAG &DAG,
return SDValue();
}
+SDValue combineCanonicalize(SDNode *Node, SelectionDAG &DAG) {
+ SDValue Operand = Node->getOperand(0);
+ EVT VT = Operand.getValueType();
+ SDLoc dl(Node);
+
+ // Canonicalize scalar variable FP Nodes.
+ SDValue MulNode;
+ SDValue One;
----------------
RKSimon wrote:
Why not `SDValue One = DAG.getNode(ISD::SINT_TO_FP, dl, VT, DAG.getConstant(1, dl, MVT::i32))`?
https://github.com/llvm/llvm-project/pull/106370
More information about the llvm-commits
mailing list