[PATCH] D27028: Add intrinsics for constrained floating point operations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 4 23:32:37 PST 2016


craig.topper added a comment.

Few stylistic comments.



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5773
+
+  SmallVector<SDValue, 3> Ops;
+  Ops.push_back(Chain);
----------------
No need for a SmallVector. Just create a 3 entry array and assign each element directly.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:955
+  SDVTList VTs = CurDAG->getVTList(Node->getOperand(1).getValueType());
+  SmallVector<SDValue, 2> Ops;
+  Ops.push_back(Node->getOperand(1));
----------------
This doesn't need to be a SmallVector. You can just use 

SDValue Ops[2] = { Node->getOperand(1), Node->getOperand(2) };


================
Comment at: lib/IR/IntrinsicInst.cpp:106
+    return rmDynamic;
+  else if (RoundingArg.equals("LLVM_ROUND_TONEAREST"))
+    return rmToNearest;
----------------
Don't use 'else' after an 'if' containing a 'return' per coding standards.


Repository:
  rL LLVM

https://reviews.llvm.org/D27028





More information about the llvm-commits mailing list