[PATCH] D15690: Gather and Scatter intrinsics in the Loop Vectorizer

Ayal Zaks via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 07:43:53 PST 2016


Ayal added a comment.

Check your documentation to follow Nadav's comment: "Please use Doxygen style comment and document each of the arguments with \p."


================
Comment at: ../lib/IR/IRBuilder.cpp:262-263
@@ +261,4 @@
+  auto PtrsTy = cast<VectorType>(Ptrs->getType());
+  assert(PtrsTy && PtrsTy->getElementType()->isPointerTy() &&
+    "Expected vector of pointers for gather");
+
----------------
This assert is redundant as it is taken care of by the two 'cast's. Unless you want to issue this particular error message?

================
Comment at: ../lib/IR/IRBuilder.cpp:282
@@ +281,3 @@
+/// Data  - data to be stored,
+/// Ptrs  - the vector of pointers, where the Val elements should be stored
+/// Align - alignment for one element
----------------
"where the Val elements" >> "where the \p Data element"

================
Comment at: ../lib/IR/IRBuilder.cpp:291-292
@@ +290,4 @@
+
+  assert(PtrsTy && PtrsTy->getElementType()->isPointerTy() &&
+    "Expected vector of pointers for scatter");
+
----------------
These two asserts are mostly dead code as they are taken care of by the three 'cast's.

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2554
@@ +2553,3 @@
+    }
+    else {
+      // Calculate the pointer for the specific unroll-part.
----------------
Formatting - 'else' should be on the same line as the brace.



Repository:
  rL LLVM

http://reviews.llvm.org/D15690





More information about the llvm-commits mailing list