[PATCH] D26023: [PowerPC] Improvements for BUILD_VECTOR Vol. 3

Kit Barton via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 18:38:08 PDT 2016


kbarton requested changes to this revision.
kbarton added a comment.
This revision now requires changes to proceed.

I think the loop on line 10619 needs to be reworked a bit (or I don't understand what it's trying to do).



================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:10595
 
+/// combineBVOfConsecutiveLoads - if this node builds a vector out of
+/// consecutive loads, convert it to a load of the vector type. Also, if the
----------------
Please convert to doxygen-style comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:10619
+
+  for (int i = 0, e = N->getNumOperands(); i < e; i++) {
+    // If any inputs are fp_round(extload), they all must be.
----------------
++i


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:10619
+
+  for (int i = 0, e = N->getNumOperands(); i < e; i++) {
+    // If any inputs are fp_round(extload), they all must be.
----------------
kbarton wrote:
> ++i
Haven't you already checked the first operand? Can this loop not start at 1 to ensure the remainder of the operands conform to the necessary conditions? That would eliminate the if (i==0) check below also. 


Repository:
  rL LLVM

https://reviews.llvm.org/D26023





More information about the llvm-commits mailing list