[PATCH] D25906: [PPC] Implement vector reverse elements builtins (vec_reve)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 06:22:22 PDT 2016

nemanjai added a comment.

Other than the inline comment, this LGTM but I'll let @kbarton give the official approval so we get another pair of eyes on the patch.

Comment at: lib/Headers/altivec.h:15041
+static inline __ATTRS_o_ai vector bool char vec_reve(vector bool char __a) {
+  vector bool char __vec = __builtin_shufflevector(
+      __a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
Sorry I missed this in the first review, but why do we have a temp here? Why not just a return statement to return the result of __builtin_shufflevector? I realize that it won't make much of a difference with the code-gen with optimization, but it is clearer and more readable to just have a return statement since the temp isn't used for anything else.


More information about the llvm-commits mailing list