[PATCH] Enable SLP-vectorization of intrinsics.

Chandler Carruth chandlerc at gmail.com
Fri Jan 10 16:55:18 PST 2014


  Just a bunch of style nit-picks, leaving most of the review to Nadav. =]


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:920
@@ +919,3 @@
+      // Check if the calls are all to the same vectorizable intrinsic.
+      if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(VL[0])) {
+        Intrinsic::ID ID = II->getIntrinsicID();
----------------
Please invert this condition and use early return instead. It makes the rest of the code much more readable.

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1581
@@ +1580,3 @@
+      std::vector<Value *> OpVecs;
+      for (int op=0, opcount = CI->getNumArgOperands(); op != opcount; ++op) {
+        ValueList OpVL;
----------------
The style (naming and spacing) of this line seems weird.

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1597
@@ +1596,3 @@
+
+      Type *Tys[] = {VectorType::get(CI->getType(),E->Scalars.size())};
+
----------------
Spacing seems weird here too. Maybe clang-format?


http://llvm-reviews.chandlerc.com/D2535



More information about the llvm-commits mailing list