[PATCH] D25912: [PowerPC] Improvements for BUILD_VECTOR Vol. 1

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 07:23:32 PDT 2016


amehsan added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:674-676
+      if (Subtarget.hasDirectMove())
+        setOperationAction(ISD::BUILD_VECTOR, MVT::v2i64, Custom);
+      setOperationAction(ISD::BUILD_VECTOR, MVT::v2f64, Custom);
----------------
I have added a similar logic in one of the patches that I committed recently. Please make sure that we do not do this twice when you commit your code. (mine is a little bit earlier in the file IIRC)


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:7214-7217
+    auto haveEfficientPattern = [&](BuildVectorSDNode *V) -> bool {
+      bool IsSplat = true;
+      bool IsLoad = false;
+      SDValue Op0 = V->getOperand(0);
----------------
Do we need a lambda that is called only once? Since this function is very long already, I think creating a separate function for this is reasonable to avoid making this function too long. 


Repository:
  rL LLVM

https://reviews.llvm.org/D25912





More information about the llvm-commits mailing list