[PATCH] D48308: [Power9] Ensure float128 in non-homogenous aggregates are passed via VSX registers

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 12:18:33 PDT 2018


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

Other than a few cosmetic changes, LGTM.



================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:7662
+  if (!EnableQuadPrecision ||
+      (Op->getValueType(0) != MVT::f128 ) ||
+      (Op->getOperand(0).getOpcode() != ISD::BUILD_PAIR) ||
----------------
A `bitcast` produces a single result, why `getValueType(0)` vs. just `getValueType()`?


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:7668
+
+  SDValue Op0 = Op->getOperand(0);
+  SDValue Val = DAG.getNode(PPCISD::BUILD_FP128, dl, MVT::f128,
----------------
There are 3 more uses of this for the `if` statement above, why not define it up there and use it in the condition as well?


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:7669
+  SDValue Op0 = Op->getOperand(0);
+  SDValue Val = DAG.getNode(PPCISD::BUILD_FP128, dl, MVT::f128,
+                            Op0.getOperand(0), Op0.getOperand(1));
----------------
No need for this temp. Just return the result of `getNode()`.


https://reviews.llvm.org/D48308





More information about the llvm-commits mailing list