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

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 02:49:41 PDT 2016


nemanjai added inline comments.


================
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
----------------
kbarton wrote:
> Please convert to doxygen-style comments.
OK.


================
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:
> 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. 
Good point. This is a remnant of a previous incarnation of this logic which got refactored but obviously incompletely. I'll simplify the loop.


Repository:
  rL LLVM

https://reviews.llvm.org/D26023





More information about the llvm-commits mailing list