[PATCH] D70866: Improve SLP code snippet

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 06:38:40 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa0c558ee4cc0: [Docs] Improve SLP code snippet (authored by spatel).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70866/new/

https://reviews.llvm.org/D70866

Files:
  llvm/docs/Vectorizers.rst


Index: llvm/docs/Vectorizers.rst
===================================================================
--- llvm/docs/Vectorizers.rst
+++ llvm/docs/Vectorizers.rst
@@ -418,8 +418,10 @@
 .. code-block:: c++
 
   void foo(int a1, int a2, int b1, int b2, int *A) {
-    A[0] = a1*(a1 + b1)/b1 + 50*b1/a1;
-    A[1] = a2*(a2 + b2)/b2 + 50*b2/a2;
+    A[0] = a1*(a1 + b1);
+    A[1] = a2*(a2 + b2);
+    A[2] = a1*(a1 + b1);
+    A[3] = a2*(a2 + b2);
   }
 
 The SLP-vectorizer processes the code bottom-up, across basic blocks, in search of scalars to combine.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70866.233083.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/ec6c5fd9/attachment.bin>


More information about the llvm-commits mailing list