[PATCH] D69275: Add constrained int->FP intrinsics

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 12:25:05 PST 2019


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2959
     Tmp1 = ExpandLegalINT_TO_FP(Node->getOpcode() == ISD::SINT_TO_FP,
-                                Node->getOperand(0), Node->getValueType(0), dl);
+                                  Node, Node->getValueType(0), dl);
     Results.push_back(Tmp1);
----------------
Extra indentation


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1106
+                                               EVT VT) {
+  SDValue Chain = SDValue(Op.getNode(),1);
+
----------------
I think the input chain should be an argument here if we're going to make this a reusable function. Op could theoretically be a node with 2 data results and a chain which would make this wrong. It should probably also return std::pair of the two results so the caller doesn't have to assume where the chain is for nodes that were created inside.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69275/new/

https://reviews.llvm.org/D69275





More information about the llvm-commits mailing list